* 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
This commit is contained in:
Richard Sandiford 2007-10-21 10:05:43 +00:00 committed by Richard Sandiford
parent 8d0e5316e7
commit d375fd5e62
4 changed files with 33 additions and 1 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -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
{

View File

@ -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>

View File

@ -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 {