[Bug target/32923] [4.3 Regression] too many memory references for `lea'
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat Jul 28 09:13:00 GMT 2007
------- Comment #5 from pinskia at gcc dot gnu dot org 2007-07-28 09:13 -------
static inline __attribute__((always_inline)) int strncmp(const char * cs,const
char * ct,size_t count)
{
register int __res;
int d0, d1, d2;
__asm__ __volatile__(
"1:\tdecl %3\n\t"
"js 2f\n\t"
"lodsb\n\t"
"scasb\n\t"
"jne 3f\n\t"
"testb %%al,%%al\n\t"
"jne 1b\n"
"2:\txorl %%eax,%%eax\n\t"
"jmp 4f\n"
"3:\tsbbl %%eax,%%eax\n\t"
"orb $1,%%al\n"
"4:"
:"=a" (__res), "=&S" (d0), "=&D" (d1), "=&c" (d2)
:"1" (cs),"2" (ct),"3" (count)
:"memory");
return __res;
}
`g'
Any register, memory or immediate integer operand is allowed, except for
registers that are not general registers.
Please report this to glibc as they have bad inline-asm. (note this is the
first time).
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32923
More information about the Gcc-bugs
mailing list