This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Linux/mipsel is now broken.
On Sat, Jan 12, 2002 at 04:44:54PM -0800, H . J . Lu wrote:
> On Fri, Jan 11, 2002 at 11:14:13PM -0800, Richard Henderson wrote:
> > On Fri, Jan 11, 2002 at 09:03:57PM -0800, H . J . Lu wrote:
> > > Richard, can you double check if your change is ok for o32?
> >
> > You'll have to give be a better problem description than that.
>
> cc1 died with
>
> Starting program: /export/build/gnu/gcc-mips/build-mipsel-linux/gcc/./cc1 -fpreprocessed /home/hjl/foo.i -quiet -dumpbase foo.i -version -o foo.s
> ...
> Program received signal SIGSEGV, Segmentation fault.
> (gdb) bt
> #0 0x004fb0f4 in synth_mult (alg_out=0x7fff6dc0, t=4, cost_limit=48)
> at /home/hjl/work/gnu/src/gcc-mips/gcc/gcc/expmed.c:2210
> #1 0x004fbc28 in expand_mult (mode=SImode, op0=0x2ad1c888, op1=0x2aac6440,
> target=0x0, unsignedp=1)
> at /home/hjl/work/gnu/src/gcc-mips/gcc/gcc/expmed.c:2378
> #2 0x005133ac in force_operand (value=0x2ad1e570, target=0x0)
> at /home/hjl/work/gnu/src/gcc-mips/gcc/gcc/expr.c:5414
> #3 0x00513080 in force_operand (value=0x2ad1e588, target=0x0)
> at /home/hjl/work/gnu/src/gcc-mips/gcc/gcc/expr.c:5451
> #4 0x004f1478 in memory_address (mode=SImode, x=0x2ad1e588)
> at /home/hjl/work/gnu/src/gcc-mips/gcc/gcc/explow.c:570
> #5 0x004f1bcc in memory_address_noforce (mode=2147446208, x=0x0)
> at /home/hjl/work/gnu/src/gcc-mips/gcc/gcc/explow.c:605
> #6 0x0052206c in do_tablejump (index=0x2ad1e588, mode=DImode, range=0x1,
> table_label=0x2ad20080, default_label=0x2ad20180)
> at /home/hjl/work/gnu/src/gcc-mips/gcc/gcc/expr.c:10434
> #7 0x005223b4 in try_tablejump (index_type=0x2acb9680, index_expr=0x1,
> minval=0x2ad1c888, range=0x2ad18940, table_label=0x2ad20080,
> default_label=0x2ad20180)
> at /home/hjl/work/gnu/src/gcc-mips/gcc/gcc/expr.c:10467
> #8 0x0064e80c in expand_end_case (orig_index=0x2ad19b80)
> at /home/hjl/work/gnu/src/gcc-mips/gcc/gcc/stmt.c:5594
> #9 0x004656b8 in genrtl_switch_stmt (t=0x2ad0a7c0)
> at /home/hjl/work/gnu/src/gcc-mips/gcc/gcc/c-semantics.c:633
> #10 0x00465da0 in expand_stmt (t=0x2ad0a7c0)
> at /home/hjl/work/gnu/src/gcc-mips/gcc/gcc/c-semantics.c:807
> #11 0x00465890 in genrtl_compound_stmt (t=0x2ad19b80)
> at /home/hjl/work/gnu/src/gcc-mips/gcc/gcc/c-semantics.c:685
> #12 0x00465c88 in expand_stmt (t=0x2ad1a8a0)
> at /home/hjl/work/gnu/src/gcc-mips/gcc/gcc/c-semantics.c:795
> #13 0x0043b07c in c_expand_body (fndecl=0x2ad19700, nested_p=0, can_defer_p=1)
> at /home/hjl/work/gnu/src/gcc-mips/gcc/gcc/c-decl.c:6988
> #14 0x0043acfc in finish_function (nested=0)
> at /home/hjl/work/gnu/src/gcc-mips/gcc/gcc/c-decl.c:6883
> #15 0x0041fa70 in yyparse_1 () at /usr/lib/bison.simple:386
> #16 0x00426c90 in yyparse ()
> at /home/hjl/work/gnu/src/gcc-mips/gcc/gcc/c-lex.c:160
> #17 0x006589e8 in compile_file ()
> at /home/hjl/work/gnu/src/gcc-mips/gcc/gcc/toplev.c:2119
> #18 0x00662228 in do_compile ()
> at /home/hjl/work/gnu/src/gcc-mips/gcc/gcc/toplev.c:5165
> #19 0x00662344 in toplev_main (argc=9, argv=0x7fff79b4)
> at /home/hjl/work/gnu/src/gcc-mips/gcc/gcc/toplev.c:5197
> #20 0x0047e56c in main (argc=718379904, argv=0x0)
> at /home/hjl/work/gnu/src/gcc-mips/gcc/gcc/main.c:35
>
> 0x4fb0e8 <synth_mult+548>: sltiu v0,a0,-1
> 0x4fb0ec <synth_mult+552>: addiu a1,s5,-1
> 0x4fb0f0 <synth_mult+556>: addu a1,a1,v0
> 0x4fb0f4 <synth_mult+560>: lw t9,-31744(gp)
> 0x4fb0f8 <synth_mult+564>: nop
> 0x4fb0fc <synth_mult+568>: jalr t9
The miscompiled files are expmed.o, sched-vis.o and tradcpp.o. In
expmed.o, at least synth_mult is miscompiled. Since synth_mult uses
long long and o32 uses 32bit registers, is your change safe for o32
when long long is involved?
H.J.