[Bug target/54480] Error: bad immediate value for offset
ramana at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Sep 4 19:37:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54480
Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |ramana at gcc dot gnu.org
Resolution| |INVALID
--- Comment #1 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> 2012-09-04 19:37:34 UTC ---
Problem is because the input is invalid . We just end up generating
ldrex r0, [r1, #-24] .
asm volatile(
"movw %1, #1\n\t"
"ldrex %2, %0\n\t"
"cmp %3, %2\n\t"
"bne.n 0f\n\t"
"strex %1, %4, %0\n\t"
"0:"
: "+m"(*location), "=&r"(result), "=&r"(tmp)
: "r"(expected), "r"(newValue)
: "memory");
Eh - you can't use m for a constraint to an address in ldrex . Try "+Q"
instead.
regards,
Ramana
More information about the Gcc-bugs
mailing list