Re: [cc65] Optimizer removing embedded asm

From: Oliver Schmidt <ol.sc1web.de>
Date: 2009-03-04 18:58:53
Hi Dan,

> The -O flag seems to be optimizing away certain asm("")-style lines

http://www.cc65.org/doc/cc65-9.html says:
Note: Inline assembler statements are subject to all optimizations
done by the compiler. There is currently no way to protect an inline
assembler statement from being moved or removed completely by the
optimizer. If in doubt, check the generated assembler output, or
disable optimizations.

Optimizations can be disabled via pragma - however only on function
scope, here's an example:
http://contiki.cvs.sourceforge.net/viewvc/*checkout*/contiki/contiki-2.x/cpu/6502/net/uip_arch.c

Best, Oliver
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed Mar 4 18:58:58 2009

This archive was generated by hypermail 2.1.8 : 2009-03-04 18:59:00 CET