------- Comment #4 from rearnsha at gcc dot gnu dot org 2008-12-16 17:39 ------- Not a bug. You need to write your macro like this:
#define burst_copy(dst,src,len) {\ unsigned t1, t2, t3; \ __asm__ __volatile__ ( \ "1: \n\t" \ "ldmia %1!,{r3-r6} \n\t" \ "stmia %0!,{r3-r6} \n\t" \ "subs %2, %2, #1 \n\t" \ "bne 1b \n\t" \ :"=r"(t1),"=r"(t2),"=r"(t3) \ :"0"(dst),"1"(src),"2"(len) \ :"r3","r4","r5","r6", "memory"); \ } Note that the results are never used, but this informs the compiler that the input values have been destroyed by the operation. Also note the clobber of "memory" to indicate that values in memory have been updated by the operation. It might be better to use an inline function for this rather than a macro, then you can use the input operands as your output operands and don't need to declare the temporaries. It would also give better error checking in some circumstances. -- rearnsha at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35624