http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53933
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-07-12
06:55:21 UTC ---
>1) the system type: arm cortex-a8 / linux-montavista
We (MontaVista) does not provide a GCC 4.6.x.
Anyways the problem is not related to GCC but rather your inline-asm is
incorrect. You should mark the output constraint as an early clobber since you
write to it before reading the input registers like so:
asm volatile (
"mov %0, %1 \n\t"
"cmp %1, %2 \n\t"
"movlt %0, %2 \n\t"
"cmp %1, %3 \n\t"
"movgt %0, %3 \n\t"
: "=&r"(a)
: "r"(a), "r"(amin), "r"(amax)
//: "r0", "r1", "r2"
);