Add x86_64-mingw64 target
[deliverable/binutils-gdb.git] / gas / testsuite / gas / i386 / i386.exp
index 3ccb7e2e2baec09f871216ce47eccffe2bb62812..096b58ae64971df2cb849dd52c408c188539b0a3 100644 (file)
@@ -20,7 +20,7 @@ proc gas_64_check { } {
     global srcdir
 
     catch "exec $srcdir/lib/run $NM $NMFLAGS --help" nm_help
-    return [regexp "targets:.*x86-64" $nm_help];
+    return [regexp "targets:.*x86-64" $nm_help]
 }
 
 proc gas_32_check { } {
@@ -29,10 +29,9 @@ proc gas_32_check { } {
     global srcdir
 
     catch "exec $srcdir/lib/run $NM $NMFLAGS --help" nm_help
-    return [regexp "targets:.*i386" $nm_help];
+    return [regexp "targets:.*i386" $nm_help]
 }
 
-
 if [expr ([istarget "i*86-*-*"] ||  [istarget "x86_64-*-*"]) && [gas_32_check]]  then {
 
     global ASFLAGS
@@ -42,50 +41,83 @@ if [expr ([istarget "i*86-*-*"] ||  [istarget "x86_64-*-*"]) && [gas_32_check]]
     run_list_test "float" "-al"
     run_list_test "general" "-al --listing-lhs-width=2"
     run_list_test "inval" "-al"
+    run_list_test "segment" "-al"
+    run_list_test "inval-seg" "-al"
     run_list_test "modrm" "-al --listing-lhs-width=2"
     run_dump_test "naked"
     run_dump_test "opcode"
     run_dump_test "intel"
     run_dump_test "intel16"
+    run_list_test "intelbad" ""
+    run_dump_test "intelok"
     run_dump_test "prefix"
     run_dump_test "amd"
     run_dump_test "katmai"
     run_dump_test "jump"
     run_dump_test "ssemmx2"
     run_dump_test "sse2"
-    run_dump_test "absrel"
-    run_dump_test "pcrel"
     run_dump_test "sub"
     run_dump_test "prescott"
+    run_dump_test "sib"
+    run_dump_test "vmx"
+    run_dump_test "suffix"
+    run_dump_test "immed32"
+    run_dump_test "equ"
     run_dump_test "divide"
     run_dump_test "padlock"
-
-    # PIC is only supported on ELF targets.
-    if { ([istarget "*-*-elf*"] || [istarget "*-*-linux*"] )
-        && ![istarget *-*-linux*aout*]
-        && ![istarget *-*-linux*oldld*] } then {
-       run_dump_test "intelpic"
-    }
+    run_dump_test "crx"
+    run_list_test "cr-err" ""
+    run_dump_test "svme"
+    run_dump_test "amdfam10"
+    run_dump_test "merom"
+    run_dump_test "rep"
+    run_dump_test "rep-suffix"
+    run_dump_test "fp"
+    run_dump_test "nops"
+    run_dump_test "nops-1"
+    run_dump_test "nops-1-i386"
+    run_dump_test "nops-1-i686"
+    run_dump_test "nops-1-merom"
+    run_dump_test "nops-2"
+    run_dump_test "nops-2-i386"
+    run_dump_test "nops-2-merom"
 
     # These tests require support for 8 and 16 bit relocs,
     # so we only run them for ELF and COFF targets.
-    if {[istarget "*-*-elf*"] || [istarget "*-*-linux*"] || [istarget "*-*-coff*"]} then {
+    if {[is_elf_format] || [istarget "*-*-coff*"]} then {
        run_dump_test "reloc"
        run_dump_test "jump16"
        run_list_test "white" "-al --listing-lhs-width=3"
+
+       # These tests should in theory work for PE targets as well,
+       # but the relocs we currently produce are slightly different
+       # from those produced for ELF/COFF based toolchains.
+       # So for now we ignore PE targets.
+       run_dump_test "pcrel"
+       run_dump_test "absrel"
     }
 
-    # Do they only work for ELF?
-    if { ([istarget "*-*-elf*"]                
-         || [istarget "*-*-linux*"]
-        && ![istarget *-*-linux*aout*]
-        && ![istarget *-*-linux*oldld*])
-    } then {
+    # ELF specific tests
+    if [is_elf_format] then {
+       # PIC is only supported on ELF targets.
+       run_dump_test "intelpic"
+
        run_dump_test "relax"
        run_dump_test "gotpc"
        run_dump_test "tlsd"
        run_dump_test "tlspic"
        run_dump_test "tlsnopic"
+       run_dump_test "bss"
+       run_dump_test "reloc32"
+       run_list_test "reloc32" "--defsym _bad_=1"
+       run_dump_test "mixed-mode-reloc32"
+    }
+
+    # This is a PE specific test.
+    if { [istarget "*-*-cygwin*"] || [istarget "*-*-pe"]
+        || [istarget "*-*-mingw*"]
+    } then {
+       run_dump_test "secrel"
     }
 
     set ASFLAGS "$old_ASFLAGS"
@@ -98,8 +130,67 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t
     set ASFLAGS "$ASFLAGS --64"
 
     run_dump_test "x86_64"
+    run_dump_test "x86-64-addr32"
     run_dump_test "x86-64-opcode"
+    run_dump_test "x86-64-pcrel"
+    run_dump_test "x86-64-rip"
+    run_dump_test "x86-64-stack"
+    run_dump_test "x86-64-stack-intel"
+    run_dump_test "x86-64-stack-suffix"
     run_list_test "x86-64-inval" "-al"
+    run_list_test "x86-64-segment" "-al"
+    run_list_test "x86-64-inval-seg" "-al"
+    run_dump_test "x86-64-branch"
+    run_dump_test "svme64"
+    run_dump_test "x86-64-amdfam10"
+    run_dump_test "x86-64-vmx"
+    run_dump_test "immed64"
+    run_dump_test "x86-64-prescott"
+    run_dump_test "x86-64-crx"
+    run_dump_test "x86-64-crx-suffix"
+    run_dump_test "x86-64-drx"
+    run_dump_test "x86-64-drx-suffix"
+    run_dump_test "x86-64-merom"
+    run_dump_test "x86-64-rep"
+    run_dump_test "x86-64-rep-suffix"
+    run_dump_test "x86-64-gidt"
+    run_dump_test "x86-64-nops"
+    if ![istarget "*-*-mingw64*"] then {
+    run_dump_test "x86-64-nops-1"
+    }
+    run_dump_test "x86-64-nops-1-k8"
+    run_dump_test "x86-64-nops-1-nocona"
+    run_dump_test "x86-64-nops-1-merom"
+
+    if { ![istarget "*-*-aix*"]
+      && ![istarget "*-*-beos*"]
+      && ![istarget "*-*-*bsd*"]
+      && ![istarget "*-*-chaos*"]
+      && ![istarget "*-*-kaos*"]
+      && ![istarget "*-*-lynx*"]
+      && ![istarget "*-*-moss*"]
+      && ![istarget "*-*-nto-qnx*"]
+      && ![istarget "*-*-rtems*"]
+      && ![istarget "*-*-sco*"]
+      && ![istarget "*-*-solaris*"]
+      && ![istarget "*-*-sysv*"] } then {
+       run_dump_test "rex"
+    }
+
+    # For ELF targets verify that @unwind works.
+    if { ([istarget "*-*-elf*"] || [istarget "*-*-linux*"]
+         || [istarget "*-*-solaris2.*"])
+        && ![istarget *-*-linux*aout*]
+        && ![istarget *-*-linux*oldld*] } then {
+       run_dump_test "x86-64-unwind"
+    }
+
+    # ELF specific tests
+    if [is_elf_format] then {
+       run_dump_test "reloc64"
+       run_list_test "reloc64" "--defsym _bad_=1"
+       run_dump_test "mixed-mode-reloc64"
+    }
 
     set ASFLAGS "$old_ASFLAGS"
 }
This page took 0.026165 seconds and 4 git commands to generate.