This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: m68k bootstrapping broken
- From: Bernardo Innocenti <bernie at develer dot com>
- To: Richard Zidlicky <rz at linux-m68k dot org>
- Cc: gcc at gnu dot org
- Date: Mon, 05 Jan 2004 05:06:11 +0100
- Subject: Re: m68k bootstrapping broken
- Organization: Develer S.r.l.
- References: <20040104215932.GC1714@linux-m68k.org>
Richard Zidlicky wrote:
Hello,
I am testing gcc-3.4-20031210. Bootstrapping fails with
this problems:
stage1/xgcc -Bstage1/ -B/usr/m68k-rz-linux/bin/ -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wold-style-definition -Werror -DHAVE_CONFIG_H -I. -I. -I../../gcc-3.4-20031210/gcc -I../../gcc-3.4-20031210/gcc/. -I../../gcc-3.4-20031210/gcc/../include \
../../gcc-3.4-20031210/gcc/config/m68k/m68k.c -o m68k.o
../../gcc-3.4-20031210/gcc/config/m68k/m68k.c: In function `output_andsi3':
../../gcc-3.4-20031210/gcc/config/m68k/m68k.c:3285: warning: comparison between
signed and unsigned
make[2]: *** [m68k.o] Error 1
Are you building with --enable-werror ? This is a long-standing warning,
I'll fix that.
/sources/rz-rpm/BUILD/build-gcc-3.4.0/gcc/xgcc -B/sources/rz-rpm/BUILD/build-gcc-3.4.0/gcc/ -B/usr/m68k-rz-linux/bin/ -B/usr/m68k-rz-linux/lib/ -isystem /usr/m68k-rz-linux/include -isystem /usr/m68k-rz-linux/sys-include -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -O3 -fomit-frame-pointer -m68020-60 -O2 -Dmc68060 -D__mc68060__ -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I -I../../gcc-3.4-20031210/gcc -I../../gcc-3.4-20031210/gcc/ -I../../gcc-3.4-20031210/gcc/../include -DL_lshrdi3 -c ../../gcc-3.4-20031210/gcc/libgcc2.c -o libgcc/./_lshrdi3.o
../../gcc-3.4-20031210/gcc/libgcc2.c: In function `__lshrdi3':
../../gcc-3.4-20031210/gcc/libgcc2.c:361: error: unrecognizable insn:
(insn 35 34 36 3 ../../gcc-3.4-20031210/gcc/libgcc2.c:350 (set (reg:SI 39)
(lshiftrt:SI (subreg:SI (reg/v:DI 35 [ uu ]) 0)
(reg:SI 38))) -1 (insn_list 34 (nil))
(expr_list:REG_DEAD (reg/v:DI 35 [ uu ])
(expr_list:REG_DEAD (reg:SI 38)
(expr_list:REG_EQUAL (lshiftrt:SI (subreg:SI (reg/v:DI 35 [ uu ]) 0)
(reg:SI 38))
(nil)))))
../../gcc-3.4-20031210/gcc/libgcc2.c:361: internal compiler error: in extract_insn, at recog.c:2061
When I compile libgcc with the same flags with a crosscompiler this
doesnt happen so it appears the compiler has miscompiled itself
somewhere else.. anyone else seen this?
Never in m68k-*-uclinux nor m68k-*-elf. Neither uses -m68020-60, but
I still can't reproduce the problem compiling the same code with m68k-uclinux-gcc:
% m68k-uclinux-gcc -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ../../combined-HEAD/gcc -isystem ./include -O3 -fomit-frame-pointer -m68020-60 -O2 -Dmc68060 -D__mc68060__ -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I -I../../combined-HEAD/gcc -I../../combined-HEAD/gcc/../include -DL_lshrdi3 -c ../../combined-HEAD/gcc/libgcc2.c -o foo.o
% m68k-uclinux-objdump -d foo.o
foo.o: file format elf32-m68k
Disassembly of section .text:
00000000 <__lshrdi3>:
0: 48e7 3e00 moveml %d2-%d6,%sp@-
4: 41ef 0018 lea %sp@(24),%a0
8: 2410 movel %a0@,%d2
a: 2628 0004 movel %a0@(4),%d3
e: 2828 0008 movel %a0@(8),%d4
12: 2002 movel %d2,%d0
14: 2203 movel %d3,%d1
16: 4a84 tstl %d4
18: 672a beqs 44 <__lshrdi3+0x44>
1a: 7020 moveq #32,%d0
1c: 9084 subl %d4,%d0
1e: 4a80 tstl %d0
20: 6f16 bles 38 <__lshrdi3+0x38>
22: 2202 movel %d2,%d1
24: e1a9 lsll %d0,%d1
26: 2a02 movel %d2,%d5
28: e8ad lsrl %d4,%d5
2a: 2003 movel %d3,%d0
2c: e8a8 lsrl %d4,%d0
2e: 2c00 movel %d0,%d6
30: 8c81 orl %d1,%d6
32: 2005 movel %d5,%d0
34: 2206 movel %d6,%d1
36: 600c bras 44 <__lshrdi3+0x44>
38: 4285 clrl %d5
3a: 4480 negl %d0
3c: 2c02 movel %d2,%d6
3e: e0ae lsrl %d0,%d6
40: 2005 movel %d5,%d0
42: 2206 movel %d6,%d1
44: 4cdf 007c moveml %sp@+,%d2-%d6
48: 4e75 rts
Do you have any local patches that might be triggering this ICE?
You may also want to retry with a more recent CVS snapshot,
just in case.
The crosscompiler so far works pretty well btw, working 2.4 & 2.6
kernels and some 3.2 problems fixed.
That's good news. As you might have noticed, the m68k backend has
been tortured quite a lot lately :-)
--
// Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/ http://www.develer.com/