This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [MIPS PATCH RFA] fix serious problem w/ MIPS .cprestore.
At Sun, 15 Sep 2002 03:43:15 +0200, Thiemo Seufer wrote:
> > + # avoid confusion: without something here, the lw above might be
> > + # put into the delay slot for the jalr below!
> > + nop
> > +
> > + jal end # 0054 jalr t9
> > + # 0058 nop
> > + # 005c lw gp,8(sp)
> > + .end func1
>
> To avoid confusion: What about adding a proper function epilogue
> at the function's end?
"... which would be?"
(i copied the struture of this test from the mips-abi32-pic test, and,
well, it does the same thing I did...)
Is there any real benefit to doing that in this test, that wouldn't be
had from doing it in an entirely separate test?
> > +
> > +
> > + .text
> > + .ent func2
> > +func2:
> > + .frame $sp,0,$31
> > + .set noreorder
> > + .cpload $25 # 0000 lui gp,hi(_gp_disp)
> > + # 0004 addiu gp,gp,lo(_gp_disp)
> > + # 0008 addu gp,gp,t9
> > + .set reorder
> > + .cprestore 32768 # 000c sw gp,8(sp)
> ^^^^^ ^
> Which one to believe? :-)
ya. got me. (also, all of the offsets are wrong!)
will fix.
cgd