------- Comment #1 from d dot g dot gorbachev at gmail dot com 2010-02-06 10:18 ------- I believe that GCC is correct, and you should write
asm volatile ("swi #0" :: "r" (a), "m" (*t)); Quoting from <http://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html>: > Note that in the following example the memory input is > necessary, otherwise GCC might optimize the store to x away -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42984