aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2008-02-18 21:05:07 +0000
committerH.J. Lu <hjl.tools@gmail.com>2008-02-18 21:05:07 +0000
commitb646068837baf88debd0a0a164ae1dc4d05ba133 (patch)
tree8f4175f0b0b5e71cd9770b812cf7ff7751eb41c7 /gas
parent4ed226fe6da8c51a04bd9063a8a58117e2c7a769 (diff)
downloadgdb-b646068837baf88debd0a0a164ae1dc4d05ba133.zip
gdb-b646068837baf88debd0a0a164ae1dc4d05ba133.tar.gz
gdb-b646068837baf88debd0a0a164ae1dc4d05ba133.tar.bz2
2008-02-18 H.J. Lu <hongjiu.lu@intel.com>
* cfi/cfi.exp (gas_x86_64_check): New. (gas_x86_32_check): Likewise. Run 32bit and 64bit tests for x86 targets if they are supportd.
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/ChangeLog6
-rw-r--r--gas/testsuite/gas/cfi/cfi.exp35
2 files changed, 37 insertions, 4 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index d973db7..fb46a27 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2008-02-18 H.J. Lu <hongjiu.lu@intel.com>
+
+ * cfi/cfi.exp (gas_x86_64_check): New.
+ (gas_x86_32_check): Likewise.
+ Run 32bit and 64bit tests for x86 targets if they are supportd.
+
2008-02-18 Jan Beulich <jbeulich@novell.com>
* gas/i386/att-regs.s, gas/i386/att-regs.d,
diff --git a/gas/testsuite/gas/cfi/cfi.exp b/gas/testsuite/gas/cfi/cfi.exp
index 593c8ff..68290da 100644
--- a/gas/testsuite/gas/cfi/cfi.exp
+++ b/gas/testsuite/gas/cfi/cfi.exp
@@ -2,11 +2,38 @@ if ![is_elf_format] then {
return
}
-if [istarget "x86_64-*"] then {
- run_dump_test "cfi-x86_64"
+proc gas_x86_64_check { } {
+ global NM
+ global NMFLAGS
+
+ set status [gas_host_run "$NM $NMFLAGS --help" ""]
+ return [regexp "targets:.*x86-64" [lindex $status 1]];
+}
+
+proc gas_x86_32_check { } {
+ global NM
+ global NMFLAGS
-} elseif [istarget "i?86-*"] then {
- run_dump_test "cfi-i386"
+ set status [gas_host_run "$NM $NMFLAGS --help" ""]
+ return [regexp "targets:.*i386" [lindex $status 1]];
+}
+
+if { [istarget "i*86-*-*"] || [istarget "x86_64-*-*"] } then {
+
+ global ASFLAGS
+ set old_ASFLAGS "$ASFLAGS"
+
+ if { [gas_x86_64_check] } then {
+ set ASFLAGS "$ASFLAGS --64"
+ run_dump_test "cfi-x86_64"
+ set ASFLAGS "$old_ASFLAGS"
+ }
+
+ if { [gas_x86_32_check] } then {
+ set ASFLAGS "$ASFLAGS --32"
+ run_dump_test "cfi-i386"
+ set ASFLAGS "$old_ASFLAGS"
+ }
} elseif { [istarget alpha*-*-*] } then {
run_dump_test "cfi-alpha-1"