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] MIPS testsuite improvements


Adam Nemet <anemet@caviumnetworks.com> writes:
> Richard Sandiford <rdsandiford@googlemail.com> writes:
>> I'd like to avoid this whereever we can.  Instead, architecture
>> requirements should be left to the mips.exp harness where possible,
>> and specified using more general directives otherwise.  E.g. we can
>> teach mips.exp what the requirements for MIPS-3D are, removing the
>> need for any architecture directives in those tests.  And for cases
>> like MIPS16e and ins-1.c, we can use new directives to specify the
>> range of permissable ISA levels or ISA revisions.
>
> First of all thank you very much for the improved infrastructure -- I am 
> looking forward to using it. 
>
> While doing my first test I accidently found that the -mips16 option test does
> not work with PIC.  The jal 1f there will be macro-expanded to a load from the
> GOT but the gp is never initialized.  I guess you must have tested using
> --with-mips-plt.
>
> One fix is to force pic0 before the jal.  As I just learned the downside of
> using .option that unlike .set you can't restore back to the original state.

Right.

> However, the good news seems to be that there is no code after this point that
> is effected.

But the final setting is the one that determines the file flags.
If there's no future .option pic2, the file won't be marked as PIC.

> Another solution would be to compute the pc and perform the mode switch with a
> JR.  Let me know if you'd prefer this.

'Fraid so ;)  I suppose it'll have to be a pcrel-based sequence,
for the same reason that JAL didn't work.

(Oh the wonders of MIPS assembly macros.  How hard can it be to
actually make "jal" assemble to the JAL instruction?)

Richard


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