Steve Ellcey <sell...@mips.com> writes:
> On Tue, 2013-07-30 at 20:32 +0100, Richard Sandiford wrote:
>> "Steve Ellcey " <sell...@mips.com> writes:
>> > I have noticed that gcc.target/mips/fpr-moves-7.c and
>> > gcc.target/mips/fpr-moves-8.c fail when running the GCC
>> > testsuite with -msoft-float.
>> 
>> Which configuration and test options are you using and what failure do
>> you see?  It works for me with mipsisa64-elf, so it sounds like it might
>> be configuration-specific.
>> 
>> With your comment about -msym32, I'm guessing you're running -mabi=64 
>> non-PIC,
>> but even mips-sim-idt64/-mabi=64/-msoft-float seems to work with
>> mipsisa64-elf.
>> 
>> Thanks,
>> Richard
>
> It looks like it may be specific to my linux target
> (mips-mti-linux-gnu).  With my elf target (mips-mti-elf), I do not get
> the error.
>
> Here is the error I get when running the testsuite with -msoft-float,
> adding -msym32 to the option list will make the problem go away. Adding
> -fno-pic to the options does not fix the problem.

Thanks, I see it now.  The condition was assuming that if the toolchain
is addressing=absolute by default (as *-linux-gnu is when configured
with --with-mips-plt), mips.exp wouldn't need to do anything to force it
to stay that way.  I'd forgotten that a test that forces -mabi=64 could
switch everything back to flag_pic on these targets.

So yeah, in answer to your original question:

> Should addressing=absolute be set here for soft-float in mips.exp
> or do you think these two tests should just not be run in soft-float mode?

The first, I think.  Or more specifically, we need to do this whenever
-mabicalls is used, rather than just when addressing!=absolute.
Could you give the patch below a try?

Thanks,
Richard


gcc/testsuite/
        * gcc.target/mips/mips.exp (mips-dg-options): Test for mabicalls
        rather than addressing!=absolute when deciding how to handle MIPS16
        when the test forces an ABI.

Index: gcc/testsuite/gcc.target/mips/mips.exp
===================================================================
--- gcc/testsuite/gcc.target/mips/mips.exp      2013-07-31 08:01:09.152984085 
+0100
+++ gcc/testsuite/gcc.target/mips/mips.exp      2013-07-31 08:11:18.720738043 
+0100
@@ -1164,7 +1164,7 @@ proc mips-dg-options { args } {
        if { [mips_using_mips16_p options]
             && ![mips_same_option_p $abi "-mabi=32"]
             && ![mips_same_option_p $abi "-mabi=o64"]
-            && (![mips_have_option_p options "addressing=absolute"]
+            && ([mips_have_option_p options "-mabicalls"]
                 || [mips_have_option_p options "-mhard-float"]) } {
            if { [mips_test_option_p options mips16] } {
                mips_make_test_option options "addressing=absolute"

Reply via email to