[PATCH,MIPS 1/3] Re-work setjmp/longjmp to match o32 FPXX and FP64 ABI
Steve Ellcey
sellcey@imgtec.com
Wed Nov 26 17:33:00 GMT 2014
On Wed, 2014-11-26 at 10:49 +0100, Corinna Vinschen wrote:
> Hi folks,
>
> Would anybody familiar with MIPS please have a look into Matthew's
> patches?
>
>
> Thanks,
> Corinna
Corinna,
I have looked over Matthew's patches and I have also done testing with
the 3 patches, building the mips-mti-elf GCC toolchain and running the
GCC testsuite using these changes. I will comment on each patch
separately.
> > +#elif __mips_fpr == 0 || __mips_fpr == 64
> > +#define FPR_LAYOUT \
> > + and $8, $4, 4; \
> > + bne $8, $0, 1f; \
> > + GPR_OFFSET ($31, 22); \
> > + addiu $4, $4, -4; \
> > +1: \
> > + FPR_OFFSET ($f20, 0); \
> > + FPR_OFFSET ($f22, 2); \
> > + FPR_OFFSET ($f24, 4); \
> > + FPR_OFFSET ($f26, 6); \
> > + FPR_OFFSET ($f28, 8); \
> > + FPR_OFFSET ($f30, 10);
The only thing I was not sure of with patch 1 is the saving of $31. I
understand the need for the stack to be 8 byte aligned but I am not sure
why we need to save $31 here and in GPR_LAYOUT. Can we just align the
stack without saving $31? I am also not sure how 22 was arrived at as
the offset.
Steve Ellcey
sellcley@imgtec.com
More information about the Newlib
mailing list