[Bug inline-asm/42984] gcc produces broken code when passing struct pointer to static inline function with asm()

2010-02-06 Thread d dot g dot gorbachev at gmail dot com
--- 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

[Bug inline-asm/42984] gcc produces broken code when passing struct pointer to static inline function with asm()

2010-02-06 Thread rearnsha at gcc dot gnu dot org
--- Comment #2 from rearnsha at gcc dot gnu dot org 2010-02-06 13:12 --- The correct way to write your ASM is to mark it as clobbering memory. That is: asm volatile (swi #0 :: r (a) : memory); -- rearnsha at gcc dot gnu dot org changed: What|Removed

[Bug inline-asm/42984] gcc produces broken code when passing struct pointer to static inline function with asm()

2010-02-06 Thread rguenth at gcc dot gnu dot org
--- Comment #3 from rguenth at gcc dot gnu dot org 2010-02-06 14:44 --- (In reply to comment #2) The correct way to write your ASM is to mark it as clobbering memory. That is: asm volatile (swi #0 :: r (a) : memory); Note that clobbering memory does not make the content