Re: https://gcc.gnu.org/ml/gcc-patches/2014-11/msg02879.html
The new FPXX tests now work correctly for soft-float configurations. Tests should only need to specify one of the 5 floating-point options and any other options are then inferred from that. The FPXX tests were the first tests to really rely on -mfp* options which is why we hadn't seen this issue before. Using a -mfp option implies that the test is hard-float and double float. To create a test that is single-float then only the -msingle-float option should be used without specifying a -mfp option. I have not done anything to improve single-float testsuite support in this patch though. I committed this via a git-svn bridge so fingers crossed it went in correctly! I also used the ChangeLog merging script from the link below which is a marvellous invention if others don't know of it. https://gcc.gnu.org/wiki/GitMirror#git-merge-changelog Thanks, Matthew gcc/testuite/ * gcc.target/mips/mips.exp: Add support for -msoft-float and -mhard-float options. Ensure that explicit -mfp* options imply both -mhard-float and -mdouble-float. * gcc.target/mips/call-clobbered-1.c: Add -mhard-float to the compile options. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218047 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 8 ++++++++ gcc/testsuite/gcc.target/mips/call-clobbered-1.c | 2 +- gcc/testsuite/gcc.target/mips/mips.exp | 8 ++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b577824..7b9b365 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2014-11-25 Matthew Fortune <matthew.fort...@imgtec.com> + + * gcc.target/mips/mips.exp: Add support for -msoft-float and + -mhard-float options. Ensure that explicit -mfp* options imply + both -mhard-float and -mdouble-float. + * gcc.target/mips/call-clobbered-1.c: Add -mhard-float to the + compile options. + 2014-11-25 Paolo Carlini <paolo.carl...@oracle.com> PR c++/63786 diff --git a/gcc/testsuite/gcc.target/mips/call-clobbered-1.c b/gcc/testsuite/gcc.target/mips/call-clobbered-1.c index ecb994f..77294aa 100644 --- a/gcc/testsuite/gcc.target/mips/call-clobbered-1.c +++ b/gcc/testsuite/gcc.target/mips/call-clobbered-1.c @@ -1,6 +1,6 @@ /* Check that we handle call-clobbered FPRs correctly. */ /* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */ -/* { dg-options "isa>=2 -mabi=32 -ffixed-f0 -ffixed-f1 -ffixed-f2 -ffixed-f3 -ffixed-f4 -ffixed-f5 -ffixed-f6 -ffixed-f7 -ffixed-f8 -ffixed-f9 -ffixed-f10 -ffixed-f11 -ffixed-f12 -ffixed-f13 -ffixed-f14 -ffixed-f15 -ffixed-f16 -ffixed-f17 -ffixed-f18 -ffixed-f19" } */ +/* { dg-options "isa>=2 -mabi=32 -mhard-float -ffixed-f0 -ffixed-f1 -ffixed-f2 -ffixed-f3 -ffixed-f4 -ffixed-f5 -ffixed-f6 -ffixed-f7 -ffixed-f8 -ffixed-f9 -ffixed-f10 -ffixed-f11 -ffixed-f12 -ffixed-f13 -ffixed-f14 -ffixed-f15 -ffixed-f16 -ffixed-f17 -ffixed-f18 -ffixed-f19" } */ void bar (void); double a; diff --git a/gcc/testsuite/gcc.target/mips/mips.exp b/gcc/testsuite/gcc.target/mips/mips.exp index a9beb27..6ae71ad 100644 --- a/gcc/testsuite/gcc.target/mips/mips.exp +++ b/gcc/testsuite/gcc.target/mips/mips.exp @@ -234,6 +234,7 @@ set mips_option_groups { dump_pattern "-dp" endianness "-E(L|B)|-me(l|b)" float "-m(hard|soft)-float" + fpu "-m(double|single)-float" forbid_cpu "forbid_cpu=.*" fp "-mfp(32|xx|64)" gp "-mgp(32|64)" @@ -858,6 +859,8 @@ proc mips-dg-finish {} { # | | # -modd-spreg -mno-odd-spreg # | | +# -mdouble-float -msingle-float +# | | # -mabs=2008/-mabs=legacy <no option> # | | # -mhard-float -msoft-float @@ -947,7 +950,12 @@ proc mips-dg-options { args } { mips_option_dependency options "-mips3d" "-mpaired-single" mips_option_dependency options "-mpaired-single" "-mfp64" mips_option_dependency options "-mfp64" "-mhard-float" + mips_option_dependency options "-mfp32" "-mhard-float" + mips_option_dependency options "-mfpxx" "-mhard-float" mips_option_dependency options "-mfp64" "-modd-spreg" + mips_option_dependency options "-mfp64" "-mdouble-float" + mips_option_dependency options "-mfp32" "-mdouble-float" + mips_option_dependency options "-mfpxx" "-mdouble-float" mips_option_dependency options "-mabs=2008" "-mhard-float" mips_option_dependency options "-mabs=legacy" "-mhard-float" mips_option_dependency options "-mrelax-pic-calls" "-mno-plt" -- 1.9.4