------- Comment #1 from pinskia at gcc dot gnu dot org 2010-02-17 23:15 ------- Your inline-asm is incorrect as you don't say that result is ax (including eax and rax) is going to be early clobbered. The inline-asm should be written as: asm volatile ( "movq $0x0102030405060708, %%rax\n\t" "mov %1, %%eax\n\t" : "=&a" (result) : "r" (vv) );
The same thing is true for the inline-asm in your locateEndToken. You should mark the two outgoing registers as early clobbered. Without it, GCC assumes the incoming registers are used before the output registers are used but in your case, we use the incoming registers after you set the outgoing register. -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Component|c |inline-asm Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43110