diff options
author | Richard Sandiford <rsandifo@nildram.co.uk> | 2007-10-21 10:05:43 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2007-10-21 10:05:43 +0000 |
commit | d375fd5e624cae69a5ee67519b645cc062f6ae8b (patch) | |
tree | 9a5321fc1de0f412d45a0160fb507e688820ea20 /gcc | |
parent | 8d0e5316e7e054e85102d36b96d24cce21b26bcd (diff) | |
download | gcc-d375fd5e624cae69a5ee67519b645cc062f6ae8b.zip gcc-d375fd5e624cae69a5ee67519b645cc062f6ae8b.tar.gz gcc-d375fd5e624cae69a5ee67519b645cc062f6ae8b.tar.bz2 |
gcc/
* config/mips/mips.c (mips_set_mips16_mode) Say sorry for hard-float
MIPS16 code unless using o32 or o64.
gcc/testsuite/
* gcc.target/mips/mips.exp (setup_mips_tests): Set mips_mips16.
(dg-mips-options): Skip tests that specify an ABI other than o32
and o64 if generating MIPS16 hard-float code.
From-SVN: r129530
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/mips/mips.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/mips/mips.exp | 20 |
4 files changed, 33 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ab5dc76..b2356a6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2007-10-21 Richard Sandiford <rsandifo@nildram.co.uk> + * config/mips/mips.c (mips_set_mips16_mode) Say sorry for hard-float + MIPS16 code unless using o32 or o64. + +2007-10-21 Richard Sandiford <rsandifo@nildram.co.uk> + * config/mips/mips.c (mips_cannot_change_mode_class): Don't check for modes smaller than 4 bytes. * config/mips/mips.md (*movhi_internal, *movqi_internal): Remove diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 92d85af..9a839c4 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -11632,6 +11632,9 @@ mips_set_mips16_mode (int mips16_p) if (flag_pic || TARGET_ABICALLS) sorry ("MIPS16 PIC"); + + if (TARGET_HARD_FLOAT_ABI && !TARGET_OLDABI) + sorry ("hard-float MIPS16 code for ABIs other than o32 and o64"); } else { diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4ed9bce..a0b4c2e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2007-10-21 Richard Sandiford <rsandifo@nildram.co.uk> + + * gcc.target/mips/mips.exp (setup_mips_tests): Set mips_mips16. + (dg-mips-options): Skip tests that specify an ABI other than o32 + and o64 if generating MIPS16 hard-float code. + 2007-10-21 Ira Rosen <irar@il.ibm.com> Revital Eres <eres@il.ibm.com> diff --git a/gcc/testsuite/gcc.target/mips/mips.exp b/gcc/testsuite/gcc.target/mips/mips.exp index 7fcf827..7a54206 100644 --- a/gcc/testsuite/gcc.target/mips/mips.exp +++ b/gcc/testsuite/gcc.target/mips/mips.exp @@ -31,6 +31,7 @@ load_lib gcc-dg.exp # $mips_isa: the ISA level specified by __mips # $mips_isa_rev: the ISA revision specified by __mips_isa_rev # $mips_arch: the architecture specified by _MIPS_ARCH +# $mips_mips16: true if MIPS16 output is selected # $mips_gp: the number of bytes in a general register # $mips_fp: the number of bytes in a floating-point register # $mips_float: "hard" or "soft" @@ -48,6 +49,7 @@ proc setup_mips_tests {} { global mips_isa global mips_isa_rev global mips_arch + global mips_mips16 global mips_gp global mips_fp global mips_float @@ -75,6 +77,9 @@ proc setup_mips_tests {} { int isa_rev = 1; #endif const char *arch = _MIPS_ARCH; + #ifdef __mips16 + int mips16 = 1; + #endif #ifdef __mips64 int gp = 64; #else @@ -105,6 +110,7 @@ proc setup_mips_tests {} { regexp {isa = ([^;]*)} $output dummy mips_isa regexp {isa_rev = ([^;]*)} $output dummy mips_isa_rev regexp {arch = "([^"]*)} $output dummy mips_arch + set mips_mips16 [regexp {mips16 = 1} $output] regexp {gp = ([^;]*)} $output dummy mips_gp regexp {fp = ([^;]*)} $output dummy mips_fp regexp {float = "([^"]*)} $output dummy mips_float @@ -145,7 +151,9 @@ proc setup_mips_tests {} { # # -mabi=* # Force a particular ABI. Skip the test if the multilib flags -# force a specific ABI or a different register size. +# force a specific ABI or a different register size. If testing +# MIPS16 multilibs, try to force -msoft-float for ABIs other than +# o32 and o64, and skip the test if this is not possible. # # -march=* # -mips* @@ -183,6 +191,7 @@ proc dg-mips-options {args} { global mips_isa global mips_isa_rev global mips_arch + global mips_mips16 global mips_gp global mips_fp global mips_float @@ -205,6 +214,15 @@ proc dg-mips-options {args} { if {[string match -mpaired-single $flag] && [lsearch $flags -mfp*] < 0} { append flags " -mfp64" + } elseif {[regexp -- {^-mabi=(.*)} $flag dummy abi] + && $mips_mips16 + && $abi != "32" + && $abi != "o64"} { + if {[lsearch $flags -mhard-float] >= 0} { + set matches 0 + } else { + append flags " -msoft-float" + } } } foreach flag $flags { |