This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Optimizer questions/issues with EBCDIC i370/s390 modes.


Ulrich Weigand wrote:

Dave Pitts wrote:

3. This fails in both native and cross compile modes. The macros in
longlong.h for the i370 appear to fail when compiling _udiv_w_sdiv:

Yes, they are broken.  They try to express a matching constraint
between a single-register operand and one subreg of a multi-register
operand, which unfortunately reload doesn't support (would be nice
if it did ...).

I've been experimenting with this patch
(See attached file: longlong.diff)
which fixes the broken constraints (at the cost of more inefficient code)
and activates the longlong.h macros also for s390.  (This version of
longlong.h corresponds to the one from GMP, b.t.w.)

If this works for you, we could look into integrating this patch.

The error seems to point at the sdiv_qrnnd macro:

./xgcc -B./ -B/usr/local/i370-ibm-openedition/bin/ -isystem /usr/local/i370-ibm-openedition/include -isystem /usr/local/i370-ibm-openedition/sys-include -S -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I../../gcc-3.2/gcc -I../../gcc-3.2/gcc/. -I../../gcc-3.2/gcc/config -I../../gcc-3.2/gcc/../include -DL_udiv_w_sdiv -c ../../gcc-3.2/gcc/libgcc2.c -fexceptions -fnon-call-exceptions -o libgcc/./_udiv_w_sdiv.o
../../gcc-3.2/gcc/libgcc2.c: In function `__udiv_w_sdiv':
../../gcc-3.2/gcc/libgcc2.c:403: `asm' operand requires impossible reload
../../gcc-3.2/gcc/libgcc2.c:427: `asm' operand requires impossible reload
make[1]: *** [libgcc/./_udiv_w_sdiv.o] Error 1


Code on lines 403 & 427 are calling the sdiv_qrnnd macro. The multiply macros with your
changes compile (haven't tried to execute them).




Mit freundlichen Gruessen / Best Regards

Ulrich Weigand

--
 Dr. Ulrich Weigand
 Linux for S/390 Design & Development
 IBM Deutschland Entwicklung GmbH, Schoenaicher Str. 220, 71032 Boeblingen
 Phone: +49-7031/16-3727   ---   Email: Ulrich.Weigand@de.ibm.com


--
Dave Pitts PULLMAN: Travel and sleep in safety and comfort.
dpitts@cozx.com My other RV IS a Pullman (Colorado Pine). http://www.cozx.com/~dpitts




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]