aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2011-10-02 18:29:27 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2011-10-02 18:29:27 +0000
commite4c07adeb05ce7715e2cfb608de2b9aa7a93d5a6 (patch)
tree76e55902244d7f2050a160fc419db15c02269341 /gcc
parentd9b59f5634a62064c652b54dc1a9dc8710261a93 (diff)
downloadgcc-e4c07adeb05ce7715e2cfb608de2b9aa7a93d5a6.zip
gcc-e4c07adeb05ce7715e2cfb608de2b9aa7a93d5a6.tar.gz
gcc-e4c07adeb05ce7715e2cfb608de2b9aa7a93d5a6.tar.bz2
re PR target/50579 (gcc.target/mips/20020620-1.c FAILs on IRIX 6.5)
gcc/testsuite/ PR target/50579 * gcc.target/mips/mips.exp (mips_long32_abi_p, mips_long64_abi_p): New procedures. (mips-dg-options): Force an ABI option if the current ABI is incompatible with the required -mlong setting. Likewise force a long setting if the current one is incompatible with the chosen ABI. Keep abi_test_option_p, abi and eabi_p updated throughout procedure. * gcc.target/mips/abi-o64-long64.c: Require -mno-abicalls instead of addressing=absolute. From-SVN: r179433
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog13
-rw-r--r--gcc/testsuite/gcc.target/mips/abi-o64-long64.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/mips.exp64
3 files changed, 68 insertions, 11 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index f6829f0..0f09e0f 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,18 @@
2011-10-02 Richard Sandiford <rdsandiford@googlemail.com>
+ PR target/50579
+ * gcc.target/mips/mips.exp (mips_long32_abi_p, mips_long64_abi_p):
+ New procedures.
+ (mips-dg-options): Force an ABI option if the current ABI is
+ incompatible with the required -mlong setting. Likewise force
+ a long setting if the current one is incompatible with the
+ chosen ABI. Keep abi_test_option_p, abi and eabi_p updated
+ throughout procedure.
+ * gcc.target/mips/abi-o64-long64.c: Require -mno-abicalls
+ instead of addressing=absolute.
+
+2011-10-02 Richard Sandiford <rdsandiford@googlemail.com>
+
* gcc.target/mips/stack-1.c: New test.
2011-10-02 Richard Sandiford <rdsandiford@googlemail.com>
diff --git a/gcc/testsuite/gcc.target/mips/abi-o64-long64.c b/gcc/testsuite/gcc.target/mips/abi-o64-long64.c
index 8177f5a..43078f6 100644
--- a/gcc/testsuite/gcc.target/mips/abi-o64-long64.c
+++ b/gcc/testsuite/gcc.target/mips/abi-o64-long64.c
@@ -1,2 +1,2 @@
-/* { dg-options "-mabi=o64 -mlong64 addressing=absolute -O2" } */
+/* { dg-options "-mabi=o64 -mlong64 -mno-abicalls -O2" } */
#include "abi-main.h"
diff --git a/gcc/testsuite/gcc.target/mips/mips.exp b/gcc/testsuite/gcc.target/mips/mips.exp
index 857cfe8..9d666fb 100644
--- a/gcc/testsuite/gcc.target/mips/mips.exp
+++ b/gcc/testsuite/gcc.target/mips/mips.exp
@@ -588,6 +588,30 @@ proc mips_64bit_abi_p { option } {
return 0
}
+# Return true if the given abi-group option implicitly requires -mlong32.
+# o64 requires this for -mabicalls, but not otherwise; pick the conservative
+# case for simplicity.
+proc mips_long32_abi_p { option } {
+ switch -glob -- $option {
+ -mabi=o64 -
+ -mabi=n32 -
+ -mabi=32 {
+ return 1
+ }
+ }
+ return 0
+}
+
+# Return true if the given abi-group option implicitly requires -mlong64.
+proc mips_long64_abi_p { option } {
+ switch -glob -- $option {
+ -mabi=64 {
+ return 1
+ }
+ }
+ return 0
+}
+
# Check whether the current target supports all the options that the
# current test requires. Return "" if so, otherwise return one of
# the incompatible options. UPSTATUS describes the option status.
@@ -1029,24 +1053,41 @@ proc mips-dg-options { args } {
# -mips16 -mhard-float requires o32 or o64.
# -mips16 PIC requires o32 or o64.
set force_abi 1
+ } elseif { [mips_have_test_option_p options "-mlong32"]
+ && [mips_long64_abi_p $abi] } {
+ set force_abi 1
+ } elseif { [mips_have_test_option_p options "-mlong64"]
+ && [mips_long32_abi_p $abi] } {
+ set force_abi 1
} else {
set force_abi 0
}
if { $gp_size == 32 } {
if { $force_abi || [mips_64bit_abi_p $abi] } {
- mips_make_test_option options "-mabi=32"
+ if { [mips_have_test_option_p options "-mlong64"] } {
+ mips_make_test_option options "-mabi=eabi"
+ mips_make_test_option options "-mgp32"
+ } else {
+ mips_make_test_option options "-mabi=32"
+ }
}
} else {
if { $force_abi || [mips_32bit_abi_p $abi] } {
- # All configurations should have an assembler that
- # supports o64, since it requires the same BFD target
- # vector as o32. In contrast, many assembler
- # configurations do not have n32 or n64 support.
- mips_make_test_option options "-mabi=o64"
+ if { [mips_have_test_option_p options "-mlong64"] } {
+ mips_make_test_option options "-mabi=eabi"
+ mips_make_test_option options "-mgp64"
+ } else {
+ # All configurations should have an assembler that
+ # supports o64, since it requires the same BFD target
+ # vector as o32. In contrast, many assembler
+ # configurations do not have n32 or n64 support.
+ mips_make_test_option options "-mabi=o64"
+ }
}
}
- unset abi
- unset eabi_p
+ set abi_test_option_p [mips_test_option_p options abi]
+ set abi [mips_option options abi]
+ set eabi_p [mips_same_option_p $abi "-mabi=eabi"]
}
# Handle dependencies between the abi options and the post-abi options.
@@ -1070,8 +1111,11 @@ proc mips-dg-options { args } {
mips_make_test_option options "-mno-mips16"
}
}
- unset abi
- unset eabi_p
+ if { [mips_long32_abi_p $abi] } {
+ mips_make_test_option options "-mlong32"
+ } elseif { [mips_long64_abi_p $abi] } {
+ mips_make_test_option options "-mlong64"
+ }
}
# Handle dependencies between the arch option and the post-arch options.