This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [PATCH,MIPS 1/3] Re-work setjmp/longjmp to match o32 FPXX and FP64 ABI
- From: Steve Ellcey <sellcey at imgtec dot com>
- To: <newlib at sourceware dot org>
- Date: Wed, 26 Nov 2014 09:33:17 -0800
- Subject: Re: [PATCH,MIPS 1/3] Re-work setjmp/longjmp to match o32 FPXX and FP64 ABI
- Authentication-results: sourceware.org; auth=none
- References: <6D39441BF12EF246A7ABCE6654B0235320F734A0 at LEMAIL01 dot le dot imgtec dot org> <20141126094958 dot GY3810 at calimero dot vinschen dot de>
- Reply-to: <sellcey at imgtec dot com>
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