This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] libgcc/MIPS: Fill in delay slots of (some) MIPS16 call stubs
- From: "Maciej W. Rozycki" <macro at codesourcery dot com>
- To: Richard Sandiford <rdsandiford at googlemail dot com>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 30 Jul 2013 19:36:01 +0100
- Subject: Re: [PATCH] libgcc/MIPS: Fill in delay slots of (some) MIPS16 call stubs
- References: <alpine dot DEB dot 1 dot 10 dot 1307291809530 dot 32382 at tp dot orcam dot me dot uk> <87k3k9b2d9 dot fsf at talisman dot default> <alpine dot DEB dot 1 dot 10 dot 1307292155120 dot 32382 at tp dot orcam dot me dot uk>
On Mon, 29 Jul 2013, Maciej W. Rozycki wrote:
> > > These stubs are I believe not really covered in our testing, because they
> > > require a mixed standard-MIPS/MIPS16 environment.
> > What's the barrier to testing a mixed environment? The normal *-linux-gnu
> > configurations have no MIPS16 multilibs, so you should be able to test it
> > on a plain mips-linux-gnu configuration using --target_flags unix/-mips16.
> > FWIW I've been using the mips64-linux-gnu equivalent
> > (--target_flags unix/-mabi=32/-mips16) without problems.
> > Or if you don't want to test on GNU/Linux, you should be able to use something
> > like mips64-elf configured with whichever --with-arch= you like (and an
> > appropriate simulator). Long time since I tried that though. I prefer
> > testing on GNU/Linux because it also covers libgcc.so symbol visibility
> > and has better libgfortran support.
> We don't have specific coverage, but something in the testsuite might
> happen to pull one or more of these thunks indeed.
It is as I feared, the coverage is sparse. The only call/return stubs
pulled across the testsuite are:
(there are some call stubs too and some PIC stubs, but they all use
different code). Of these only the first suffers from the old GAS
0: 03e09021 move s2,ra
4: 44846000 mtc1 a0,$f12
8: 44857000 mtc1 a1,$f14
c: 0040f809 jalr v0
10: 0040c821 move t9,v0
14: 44020000 mfc1 v0,$f0
18: 02400008 jr s2
1c: 00000000 nop
as only stubs that return a single float result are affected (ones that
return a single complex or a double result are not, because they use more
than one CP1 move in their epilogues and old GAS is capable enough to
schedule the last move into the JR's delay slot itself).
> > > libgcc/
> > > * config/mips/mips16.S (DELAYf): Alias to DELAYt for the MIPS IV
> > > ISA and up.
> > OK, thanks, but please do run it through the testsuite first.
> I'll see if I can do it -- the MIPS/Linux tree I used for recent MIPS32r2
> MADD.fmt testing has no MIPS16 multilibs configured, so it might happen to
> just work with -mips16 passed as an extra option (otherwise MIPS16 libs
> would be automagically picked instead). I'll check if binaries executeed
> really pulled any of the thunks concerned.
No regressions seen, applied now. Thanks for your review.