x86: Add -O[2|s] assembler command-line options
[deliverable/binutils-gdb.git] / gas / testsuite / gas / cfi / cfi.exp
index 68290da9a7ed23a4c49f34a9464710bac809f83c..588c5d5f3b406c17a874d1c3f6e455fa584718d4 100644 (file)
@@ -1,4 +1,20 @@
-if ![is_elf_format] then {
+# Copyright (C) 2012-2018 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  
+
+if { ![is_elf_format] && ![is_pecoff_format] } then {
     return
 }
 
@@ -35,12 +51,39 @@ if  { [istarget "i*86-*-*"] || [istarget "x86_64-*-*"] } then {
        set ASFLAGS "$old_ASFLAGS"
     }
 
+    if { [is_elf_format] } then {
+       run_dump_test "cfi-label"
+    }
+
+    if { [is_pecoff_format] } then {
+       run_dump_test "reloc-pe-i386"
+    }
+
 } elseif { [istarget alpha*-*-*] } then {
     run_dump_test "cfi-alpha-1"
     run_dump_test "cfi-alpha-2"
     run_dump_test "cfi-alpha-3"
 
-} elseif { [istarget ppc*-*-*] || [istarget powerpc*-*-*] } then {
+} elseif { [istarget "arc*-*-*"] } then {
+    run_dump_test "cfi-arc-1"
+
+} elseif { [istarget "arm*-*"] } then {
+    # Only ELF based ARM targets support CFI.
+    if { [is_pecoff_format] } then {
+       return
+    }
+    run_dump_test "cfi-arm-1"
+
+} elseif { [istarget "hppa*-linux*"] } then {
+    run_dump_test "cfi-hppa-1"
+
+} elseif { [istarget "m68*-*"] && ![istarget "m68hc1*-*"] } then {
+    run_dump_test "cfi-m68k"
+
+} elseif { [istarget "mips*-*"] } then {
+    run_dump_test "cfi-mips-1"
+
+} elseif { [istarget powerpc*-*-*] } then {
     run_dump_test "cfi-ppc-1"
 
 } elseif { [istarget s390*-*-*] } then {
@@ -49,8 +92,15 @@ if  { [istarget "i*86-*-*"] || [istarget "x86_64-*-*"] } then {
        run_dump_test "cfi-s390x-1"
     }
 
-} elseif { [istarget "m68*-*"] } then {
-    run_dump_test "cfi-m68k"
+} elseif [istarget "sh*-*"] then {
+    if { [istarget "*-pe" ] || [istarget "*-rtemscoff*"] } then {
+       return
+    }
+
+    if { [istarget sh64*-*-*] || [istarget sh5*-*-*] } then {
+    } else {
+       run_dump_test "cfi-sh-1"
+    }
 
 } elseif { [istarget sparc*-*-*] } then {
     global NM
@@ -62,31 +112,29 @@ if  { [istarget "i*86-*-*"] || [istarget "x86_64-*-*"] } then {
        run_dump_test "cfi-sparc64-1"
     }
 
-} elseif [istarget "sh*-*"] then {
-    if { [istarget sh64*-*-*] || [istarget sh5*-*-*] } then {
-    } else {
-       run_dump_test "cfi-sh-1"
-    }
-
-} elseif { [istarget "arm*-*"] || [istarget "xscale*-*"] } then {
-    run_dump_test "cfi-arm-1"
-
-} elseif { [istarget "mips*-*"] } then {
-    run_dump_test "cfi-mips-1"
-} elseif { [istarget "hppa*-linux*"] } then {
-    run_dump_test "cfi-hppa-1"
 } else {
     return
 }
 
 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
-if { ![istarget "mips*-*"] } then {
+
+# 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"
+  if { ![is_pecoff_format] } then {
+    # This test uses .subsection/.previous which are elf-specific.
+    run_dump_test "cfi-common-5"
+  }
+  # Some targets don't support PC relative cfi directives
+  if { ![istarget "mips*-*"] &&
+       !([istarget powerpc*-*-*] && [is_pecoff_format]) } then {
     run_dump_test "cfi-common-6"
+  }
+  run_dump_test "cfi-common-7"
+  run_dump_test "cfi-common-8"
+  run_dump_test "cfi-common-9"
 }
This page took 0.029685 seconds and 4 git commands to generate.