X-Git-Url: https://oss.titaniummirror.com/gitweb?p=msp430-binutils.git;a=blobdiff_plain;f=gas%2Ftestsuite%2Fgas%2Fcfi%2Fcfi.exp;fp=gas%2Ftestsuite%2Fgas%2Fcfi%2Fcfi.exp;h=0d4c419d0ef8e2fd93810de0248a8844fa5ff9f3;hp=b396f9e85235e001853f1a06b2a5d684b642e9f0;hb=88750007d7869f178f0ba528f41efd3b74c424cf;hpb=6df9443a374e2b81278c61b8afc0a1eef7db280b diff --git a/gas/testsuite/gas/cfi/cfi.exp b/gas/testsuite/gas/cfi/cfi.exp index b396f9e..0d4c419 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 + + 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" + } -} elseif [istarget "i?86-*"] then { - run_dump_test "cfi-i386" + 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" @@ -28,11 +55,10 @@ if [istarget "x86_64-*"] then { } elseif { [istarget sparc*-*-*] } then { global NM global NMFLAGS - global srcdir - catch "exec $srcdir/lib/run $NM $NMFLAGS --help" nm_help + set nm_status [gas_host_run "$NM $NMFLAGS --help" ""] run_dump_test "cfi-sparc-1" - if { [regexp "elf64\[_-\]sparc" $nm_help] } then { + if { [regexp "elf64\[_-\]sparc" [lindex $nm_status 1]] } then { run_dump_test "cfi-sparc64-1" } @@ -54,13 +80,19 @@ if [istarget "x86_64-*"] then { } run_list_test "cfi-diag-1" "" -run_dump_test "cfi-common-1" -run_dump_test "cfi-common-2" -run_dump_test "cfi-common-3" -run_dump_test "cfi-common-4" -run_dump_test "cfi-common-5" -# MIPS doesn't support PC relative cfi directives +# HPPA64 uses 64-bit relocations, which results in all of the dump +# offset numbers not matching up. +if { ![istarget "hppa64*-*"] } then { + run_dump_test "cfi-common-1" + run_dump_test "cfi-common-2" + run_dump_test "cfi-common-3" + run_dump_test "cfi-common-4" + run_dump_test "cfi-common-5" + run_dump_test "cfi-common-7" +} + +# MIPS doesn't support PC relative cfi directives. if { ![istarget "mips*-*"] } then { run_dump_test "cfi-common-6" }