Is there a way to get the high half of a DImode on a 32-bit machine?
gcc@horizon.com
gcc@horizon.com
Sun Sep 30 22:35:00 GMT 2001
> I suppose you may go ahead and add it to print_operand_address() and
> print_reg() in gcc/config/i386/i386.c
> 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.
Hints taken. I've never patched gcc before, so I'm kind of nervous,
but whack me hard enough with a clue-by-four and I get it.
> 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.
Um, oops! I knew that; I just wasn't thinking so clearly when typing it.
I *didn't* know that "+r" is now supported, but yes, using "0" is mandatory.
However, it does indeed fail:
$ gcc-2.95 -o foo foo.c
foo.c: In function `checksum':
foo.c:14: Internal compiler error:
foo.c:14: Internal compiler error in `print_operand', at config/i386/i386.c:3325
Please submit a full bug report.
See <URL: http://www.gnu.org/software/gcc/bugs.html > for instructions.
$ gcc-3.0 -o foo foo.c
foo.c: In function `checksum':
foo.c:14: Internal compiler error in print_operand, at config/i386/i386.c:3539
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL: http://www.gnu.org/software/gcc/bugs.html > for instructions.
More information about the Gcc-bugs
mailing list