Re: [rfa] mips argument passing fixes for o32

Andrew Cagney
2001-07-18T13:29:00Z

>>GCC is always left shifting s1 in a register (regardless of -EL or EB).
>
>
>
> Well....
> proton 25% cc -c -32 t3.c -show
> /usr/lib/cc -DEFAULT:abi=n32:isa=mips4:proc=r10k -c -32 t3.c -show
> /usr/lib/cfe -D_MIPS_FPSET=16 -D_MIPS_ISA=2 -D_ABIO32=1 -D_MIPS_SIM=_ABIO32 -D_MIPS_SZINT=32 -D_MIPS_SZLONG=32 -D_MIPS_SZPTR=32 -D_SIZE_INT=32 -D_SIZE_LONG=32 -D_SIZE_PTR=32 -D__EXTENSIONS__ -DLANGUAGE_C -D_LANGUAGE_C -D__INLINE_INTRINSICS -Dsgi -D__sgi -Dunix -Dmips -Dhost_mips -D__unix -D__host_mips -D_SVR4_SOURCE -D_MODERN_C -D_SGI_SOURCE -D_PIC -D__DSO__ -DSYSTYPE_SVR4 -D_SYSTYPE_SVR4 -D_LONGLONG -D__mips=2 -I -D_MIPSEB -DMIPSEB -D__STDC__=1 -I/usr/include t3.c -Xv -D_CFE -Amachine(mips) -Asystem(unix) -call_shared -G 0 -std -XS/tmp/ctmsta000Ss -mips2 -EB -Xg0 -O1 > /tmp/ctmfa000Ss
> cfe: main /usr/lib/ugen -v -G 0 -pic2 -mips2 -EB -g0 -O1 /tmp/ctmfa000Ss -o /tmp/ctmca000Ss -t /tmp/ctmsta000Ss -temp /tmp/ctmgta000Ss
> ugen: main
> /usr/lib/as1 -t5_ll_sc_bug -elf -pic2 -v -G 0 -p0 -mips2 -EB -g0 -O1 /tmp/ctmca000Ss -o t3.o -t /tmp/ctmsta000Ss
> as1: main
> proton 26% dis t3.o

> [ 7] 0x 0: 3c 1c 00 00 lui gp,0
> [ 7] 0x 4: 27 9c 00 00 addiu gp,gp,0
> [ 7] 0x 8: 03 99 e0 21 addu gp,gp,t9
> [ 8] 0x c: 8f 8e 00 00 lw t2,0(gp)
> [ 8] 0x 10: 8f 99 00 00 lw t9,0(gp)
> [ 7] 0x 14: 27 bd ff e0 addiu sp,sp,-32
> [ 8] 0x 18: 91 ce 00 00 lbu t2,0(t2)
> [ 7] 0x 1c: af bf 00 1c sw ra,28(sp)
> [ 7] 0x 20: af bc 00 18 sw gp,24(sp)
> [ 8] 0x 24: a3 ae 00 00 sb t2,0(sp)
> [ 8] 0x 28: 03 20 f8 09 jalr t9
> [ 8] 0x 2c: 8f a4 00 00 lw a0,0(sp)

>
> And -EL seems to generate the same instructions (but I don't quite
> trust -EL).

Now I'm really confused, that is -EB -o32 and no shift. I think I'll try to scrounge up an IRIX box and have a play.

Andrew