This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [committed] Add support for MIPS16e save/restore instructions


Richard Sandiford wrote:
> David Ung <davidu@mips.com> writes:
> > Richard Sandiford wrote:
> >>> This patch is currently failing when building the dwarf unwind in libgcc.
> >> 
> >> Hmm, it worked for me (including a test run I did overnight and today
> >> with the patch as committed).  What error do you get?
> >> 
> >> Richard
> >> 
> >
> >
> > /localhome/ths/sde7-upstream/combined-install/sde/bin/ 
> > -B/localhome/ths/sde7-upstream/combined-install/sde/lib/ -isystem 
> > /localhome/ths/sde7-upstream/combined-install/sde/include -isystem 
> > /localhome/ths/sde7-upstream/combined-install/sde/sys-include 
> > -L/localhome/ths/sde7-upstream/combined-build/./ld -O2 -g -O2 -mips16 -O2  -O2 
> > -g -O2  -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE   -W -Wall -Wwrite-strings 
> > -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem 
> > ./include  -G 0 -fno-optimize-sibling-calls -mcode-xonly -g -DHAVE_GTHR_DEFAULT 
> > -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED   -I. -I. -I../../.././gcc 
> > -I../../../../combined/libgcc -I../../../../combined/libgcc/. 
> > -I../../../../combined/libgcc/../gcc -I../../../../combined/libgcc/../include 
> > -o unwind-dw2.o -MT unwind-dw2.o -MD -MP -MF unwind-dw2.dep -fexceptions -c 
> > ../../../../combined/libgcc/../gcc/unwind-dw2.c
> > /tmp/ccGOz9Ay.s: Assembler messages:
> > /tmp/ccGOz9Ay.s:5857: Error: arg/static registers overlap
> > /tmp/ccGOz9Ay.s:5965: Error: arg/static registers overlap
> >
> > note that we are compiling with -G0 (and -fno-optimize-sibling-calls -mcode-xonly).
> 
> Ah, sorry, I didn't realise you meant that a local configuration
> didn't build.  (Is this a locally-patched elfoabi configuration
> or your own SDE configuration?  I thought from your original mail
> that it was the former, but I gather from the quote above that
> you mean the latter.)
> 
> Anyway, could you create a PR with the preprocessed source code?
> Thanks.

The problem is that gcc generates invalid assembler syntax for
save/restore in some cases. E.g.:

[...]
	.globl	_Unwind_Resume
.LFB75:
	.loc 3 224 0
	.set	mips16
	.ent	_Unwind_Resume
_Unwind_Resume:
	.frame	$sp,2016,$31		# vars= 1968, regs= 7/0, args= 16, gp= 0
	.mask	0x800300f0,-4
	.fmask	0x00000000,0
.LVL512:
	save	2016,$16,$17,$4-$7,$31
[...]

or even:

[...]
	.globl	_Unwind_ForcedUnwind
.LFB74:
	.loc 3 201 0
	.set	mips16
	.ent	_Unwind_ForcedUnwind
_Unwind_ForcedUnwind:
	.frame	$sp,2016,$31		# vars= 1968, regs= 7/0, args= 16, gp= 0
	.mask	0x800300f0,-4
	.fmask	0x00000000,0
.LVL524:
	save	$4-$6,2016,$16,$17,$4-$7,$31

With the current code I expect this to happen for any mips16e
compile of unwind-dw2.c.


Thiemo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]