i386: asm("%z0" :: "g" ((char)0)) aborts...
Alexandre Oliva
aoliva@redhat.com
Sat Sep 29 00:00:00 GMT 2001
On Sep 11, 2001, gcc@horizon.com wrote:
> It seems that someone forgot the "case 1:" in the relevant switch() in
> print_operand (i386.c:3458 on my snapshot)
Actually, it can't handle CONST_INTs, because they don't have a mode
to indicate its width. A patch that checks for non-VOIDmode and
complains would be appreciated.
> To give a more useful version, try the ones-complement checksum routine
> asm("add%z0 %2,%0; adc%z0 %3,%0" : "=r" (sum) :
> "r" (sum), "g" (c), "g" ((typeof sum)0));
Does this fail similarly? I don't see why. In any case, I suggest
using "+r" instead of "=r" and "r" for sum. If you'd rather not do
that to support older versions of GCC that didn't support "+" in asm
constraints, I suggest using "0" in the input `sum' constraint.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
More information about the Gcc-bugs
mailing list