-# Copyright (C) 2012-2019 Free Software Foundation, Inc.
+# Copyright (C) 2012-2020 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
#
# i386 tests
#
+if { ![istarget "i*86-*-*"] && ![istarget "x86_64-*-*"] } then {
+ return
+}
+
proc gas_64_check { } {
global NM
global NMFLAGS
return [regexp "32bit/64bit/x32" [lindex $status 1]];
}
-if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]] then {
-
+if [gas_32_check] then {
global ASFLAGS
set old_ASFLAGS "$ASFLAGS"
set ASFLAGS "$ASFLAGS --32"
run_dump_test "intelok"
run_dump_test "prefix"
run_list_test "prefix32" "-al"
+ run_dump_test "lea"
run_dump_test "amd"
run_dump_test "katmai"
run_dump_test "jump"
run_dump_test "sse2-16bit"
run_dump_test "sub"
run_dump_test "sse3"
+ run_dump_test "sse3-intel"
run_dump_test "sib"
run_dump_test "sib-intel"
run_dump_test "disp"
run_list_test "suffix-bad"
run_dump_test "immed32"
run_dump_test "equ"
+ run_list_test "equ-bad"
run_dump_test "divide"
run_dump_test "padlock"
run_dump_test "crx"
run_dump_test "nops-5-i686"
run_dump_test "nops-6"
run_dump_test "nops-7"
+ run_dump_test "noreg16"
+ run_list_test "noreg16"
+ run_dump_test "noreg16-data32"
+ run_dump_test "noreg32"
+ run_list_test "noreg32"
+ run_dump_test "noreg32-data16"
+ run_list_test "movx16" "-I${srcdir}/$subdir -al"
+ run_list_test "movx32" "-al"
+ run_dump_test "sizing32"
run_dump_test "addr16"
run_dump_test "addr32"
+ run_dump_test "code16"
run_list_test "oversized16" "-al"
run_dump_test "sse4_1"
run_dump_test "sse4_1-intel"
run_dump_test "sse4_2-intel"
run_dump_test "crc32"
run_dump_test "crc32-intel"
+ run_dump_test "crc32-suffix"
run_list_test "inval-crc32" "-al"
run_dump_test "simd"
run_dump_test "simd-intel"
run_dump_test "evex-lig-2"
run_dump_test "evex-wig1"
run_dump_test "evex-wig1-intel"
+ run_dump_test "evex-no-scale-32"
run_dump_test "sse2avx"
run_list_test "inval-avx" "-al"
run_list_test "inval-avx512f" "-al"
run_dump_test "sse-noavx"
run_dump_test "movbe"
run_dump_test "movbe-intel"
+ run_dump_test "movbe-suffix"
run_list_test "inval-movbe" "-al"
run_dump_test "ept"
run_dump_test "ept-intel"
run_dump_test "rtm"
run_dump_test "rtm-intel"
run_dump_test "fma4"
+ run_dump_test "fma4-lig"
run_dump_test "lwp"
run_dump_test "lwp-16bit"
run_dump_test "xop"
+ run_dump_test "xop-lig"
run_dump_test "xop32reg"
run_dump_test "bmi"
run_dump_test "bmi-intel"
run_list_test "mpx-inval-1" "-al"
run_list_test "mpx-inval-2" "-al"
run_dump_test "mpx-add-bnd-prefix"
+ run_dump_test "mpx-16bit"
run_list_test "bnd" "-al"
run_dump_test "sha"
run_dump_test "clflushopt"
run_dump_test "avx512bw_vl"
run_dump_test "avx512dq-intel"
run_dump_test "avx512dq"
+ run_list_test "avx512dq-inval"
run_dump_test "avx512dq_vl-intel"
run_dump_test "avx512dq_vl"
run_dump_test "omit-lock-yes"
run_dump_test "cldemote-intel"
run_dump_test "movdir"
run_dump_test "movdir-intel"
+ run_dump_test "movdir-16bit"
run_list_test "movdir64b-reg"
run_dump_test "enqcmd"
run_dump_test "enqcmd-intel"
+ run_dump_test "enqcmd-16bit"
run_list_test "enqcmd-inval"
+ run_dump_test "serialize"
+ run_dump_test "tdx"
+ run_dump_test "tsxldtrk"
run_dump_test "vp2intersect"
run_dump_test "vp2intersect-intel"
run_list_test "vp2intersect-inval-bcast"
+ run_dump_test "keylocker"
+ run_dump_test "keylocker-intel"
run_list_test "avx512vl-1" "-al"
run_list_test "avx512vl-2" "-al"
+ run_list_test "avx512vl-ambig"
run_list_test "avx512vl-plain" "-al"
run_dump_test "fpu-bad"
run_dump_test "cet"
run_list_test "cet-ibt-inval"
run_list_test "cet-shstk-inval"
run_dump_test "pseudos"
+ run_list_test "pseudos-bad"
run_dump_test "notrack"
run_dump_test "notrack-intel"
run_list_test "notrackbad" "-al"
run_dump_test "align-1b"
run_list_test "inval-pseudo" "-al"
run_dump_test "nop-1"
+ run_dump_test "nop-1-suffix"
run_dump_test "nop-2"
run_dump_test "optimize-1"
run_dump_test "optimize-1a"
run_dump_test "optimize-2"
+ run_dump_test "optimize-2b"
run_dump_test "optimize-3"
run_dump_test "optimize-4"
run_dump_test "optimize-5"
run_list_test "optimize-6a" "-I${srcdir}/$subdir -march=+noavx -al"
run_dump_test "optimize-6b"
run_list_test "optimize-7" "-I${srcdir}/$subdir -march=+noavx2 -al"
+ run_dump_test "lea-optimize"
+ run_dump_test "align-branch-1a"
+ run_dump_test "align-branch-1b"
+ run_dump_test "align-branch-1c"
+ run_dump_test "align-branch-1d"
+ run_dump_test "align-branch-1e"
+ run_dump_test "align-branch-1f"
+ run_dump_test "align-branch-1g"
+ run_dump_test "align-branch-1h"
+ run_dump_test "align-branch-1i"
+ run_dump_test "align-branch-2a"
+ run_dump_test "align-branch-2b"
+ run_dump_test "align-branch-2c"
+ run_dump_test "align-branch-4a"
+ run_dump_test "align-branch-4b"
+ run_dump_test "align-branch-5"
+ run_dump_test "align-branch-6"
+ run_dump_test "align-branch-7"
+ run_dump_test "align-branch-8"
+ run_dump_test "align-branch-9"
+ run_dump_test "lfence-load"
+ run_dump_test "lfence-indbr-a"
+ run_dump_test "lfence-indbr-b"
+ run_dump_test "lfence-indbr-c"
+ run_dump_test "lfence-ret-a"
+ run_dump_test "lfence-ret-b"
+ run_dump_test "lfence-ret-c"
+ run_dump_test "lfence-ret-d"
+ run_dump_test "lfence-byte"
# These tests require support for 8 and 16 bit relocs,
# so we only run them for ELF and COFF targets.
- if {[is_elf_format] || [istarget "*-*-coff*"]} then {
+ if {[is_elf_format]
+ || [istarget "*-*-vxworks*"]
+ || [istarget "*-*-coff*"]
+ } then {
run_dump_test "reloc"
run_dump_test "jump16"
run_list_test "white" "-al --listing-lhs-width=3"
}
# ELF specific tests
- if [is_elf_format] then {
+ if {[is_elf_format] || [istarget "*-*-vxworks*"]} then {
# PIC is only supported on ELF targets.
run_dump_test "intelpic"
run_list_test "reloc32" "--defsym _bad_=1"
run_dump_test "intel-got32"
run_dump_test "intel-movs32"
+ run_dump_test "intel-movs16"
+ run_dump_test "intel-cmps32"
+ run_dump_test "intel-cmps16"
run_list_test "inval-equ-1" "-al"
run_list_test "inval-equ-2" "-al"
run_dump_test "ifunc"
run_dump_test "localpic"
run_dump_test "debug1"
+ run_dump_test "dwarf2-line-1"
+ run_dump_test "dwarf2-line-2"
+ run_dump_test "dwarf2-line-3"
+ run_dump_test "dwarf2-line-4"
+
run_dump_test "dw2-compress-2"
run_dump_test "dw2-compressed-2"
run_dump_test "relax-3"
run_dump_test "relax-4"
+ run_dump_test "relax-5"
run_dump_test "got"
run_dump_test "got-no-relax"
run_dump_test "nop-4"
run_dump_test "nop-5"
run_dump_test "nop-6"
+ run_dump_test "unique"
- run_dump_test "evex-no-scale-32"
run_dump_test "property-1"
run_dump_test "property-2"
+ run_dump_test "property-3"
+ run_dump_test "property-4"
+ run_dump_test "property-5"
+ run_dump_test "property-6"
+ run_dump_test "property-10"
+
+ if {[istarget "*-*-linux*"]} then {
+ run_dump_test "align-branch-3"
+ }
if { [gas_64_check] } then {
run_dump_test "att-regs"
run_list_test "code64-inval" "-I${srcdir}/$subdir -al"
}
- if {![istarget "*-*-nacl*"]} then {
+ if {![istarget "*-*-vxworks*"]} then {
run_dump_test "iamcu-1"
run_dump_test "iamcu-2"
run_dump_test "iamcu-3"
}
# Common tests
-if [expr [istarget "i*86-*-*"] || [istarget "x86_64-*-*"]] then {
- if {![istarget "i*86-*-elfiamcu"] && [gas_64_check]} then {
- run_dump_test "intel-expr"
- run_dump_test "string-ok"
- }
- run_list_test "string-bad" ""
- run_list_test "reg-bad" ""
- run_list_test "space1" "-al"
- run_list_test "xmmword" ""
- run_dump_test rept
- run_dump_test pr19498
- run_list_test "nop-bad-1" ""
- run_list_test "unspec" ""
- if [is_elf_format] then {
- run_list_test_stdin "list-1" "-al"
- run_list_test_stdin "list-2" "-al"
- run_list_test_stdin "list-3" "-al"
- run_dump_test "dw2-compress-1"
- run_dump_test "dw2-compress-3a"
- run_dump_test "dw2-compress-3b"
- run_dump_test "dw2-compressed-1"
- run_dump_test "dw2-compressed-3a"
- run_dump_test "dw2-compressed-3b"
- }
+if {![istarget "i*86-*-elfiamcu"] && [gas_64_check]} then {
+ run_dump_test "intel-expr"
+ run_dump_test "string-ok"
}
+run_list_test "string-bad" ""
+run_list_test "reg-bad" ""
+run_list_test "space1" "-al"
+run_list_test "xmmword" ""
+run_dump_test rept
+run_dump_test pr19498
+run_list_test "nop-bad-1" ""
+run_list_test "unspec" ""
+if {[is_elf_format] || [istarget "*-*-vxworks*"]} then {
+ run_list_test_stdin "list-1" "-al"
+ run_list_test_stdin "list-2" "-al"
+ run_list_test_stdin "list-3" "-al"
+ run_dump_test "dw2-compress-1"
+ run_dump_test "dw2-compress-3a"
+ run_dump_test "dw2-compress-3b"
+ run_dump_test "dw2-compressed-1"
+ run_dump_test "dw2-compressed-3a"
+ run_dump_test "dw2-compressed-3b"
-if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] then {
+ if {![istarget "*-*-dragonfly*"]
+ && ![istarget "*-*-gnu*"]
+ && ![istarget "*-*-freebsd*"]
+ && ![istarget "*-*-linux*"]
+ && ![istarget "*-*-netbsd*"]} then {
+ run_dump_test "svr4"
+ }
+}
+if [gas_64_check] then {
global ASFLAGS
set old_ASFLAGS "$ASFLAGS"
set ASFLAGS "$ASFLAGS --64 --defsym x86_64=1 --strip-local-absolute"
run_dump_test "x86-64-vmfunc"
run_dump_test "immed64"
run_dump_test "x86-64-sse3"
+ run_dump_test "x86-64-sse3-intel"
run_dump_test "x86-64-crx"
run_dump_test "x86-64-crx-suffix"
run_dump_test "x86-64-drx"
run_dump_test "x86-64-nops-5"
run_dump_test "x86-64-nops-5-k8"
run_dump_test "x86-64-nops-7"
+ run_dump_test "x86-64-sysenter"
+ run_dump_test "x86-64-sysenter-intel"
+ run_dump_test "x86-64-sysenter-mixed"
+ run_dump_test "x86-64-sysenter-amd"
+ run_list_test "x86-64-sysenter-amd" "-mamd64"
+ run_dump_test "noreg64"
+ run_list_test "noreg64"
+ run_dump_test "noreg64-data16"
+ run_dump_test "noreg64-rex64"
+ run_dump_test "noreg-intel64"
+ run_list_test "noreg-intel64" "-I${srcdir}/$subdir -mintel64"
+ run_list_test "movx64" "-al"
run_list_test "cvtsi2sX"
run_dump_test "x86-64-sse4_1"
run_dump_test "x86-64-sse4_1-intel"
run_dump_test "x86-64-sse4_2-intel"
run_dump_test "x86-64-crc32"
run_dump_test "x86-64-crc32-intel"
+ run_dump_test "x86-64-crc32-suffix"
run_list_test "x86-64-inval-crc32" "-al"
run_dump_test "x86-64-simd"
run_dump_test "x86-64-simd-intel"
run_dump_test "x86-64-disp"
run_dump_test "x86-64-disp-intel"
run_dump_test "intel-movs64"
+ run_dump_test "intel-cmps64"
run_dump_test "x86-64-disp32"
run_dump_test "rexw"
run_list_test "x86-64-specific-reg"
run_dump_test "x86-64-evex-wig1"
run_dump_test "x86-64-evex-wig1-intel"
run_dump_test "x86-64-evex-wig2"
+ run_dump_test "evex-no-scale-64"
run_dump_test "x86-64-sse2avx"
run_list_test "x86-64-inval-avx" "-al"
run_list_test "x86-64-inval-avx512f" "-al"
run_dump_test "x86-64-sse-noavx"
run_dump_test "x86-64-movbe"
run_dump_test "x86-64-movbe-intel"
+ run_dump_test "x86-64-movbe-suffix"
run_list_test "x86-64-inval-movbe" "-al"
run_dump_test "x86-64-ept"
run_dump_test "x86-64-ept-intel"
run_dump_test "x86-64-sse2avx-opts-intel"
run_dump_test "x86-64-avx-swap"
run_dump_test "x86-64-avx-swap-intel"
+ run_dump_test "x86-64-avx-swap-2"
run_dump_test "x86-64-bmi2"
run_dump_test "x86-64-bmi2-intel"
run_dump_test "x86-64-fma"
run_dump_test "x86-64-prefetchwt1-intel"
run_dump_test "x86-64-se1"
run_dump_test "x86-64-equ"
+ run_list_test "x86-64-equ-bad"
run_dump_test "x86-64-avx512f_vl-intel"
run_dump_test "x86-64-avx512f_vl-opts-intel"
run_dump_test "x86-64-avx512f_vl-opts"
run_dump_test "x86-64-avx512dq_vl"
run_dump_test "x86-64-suffix"
run_dump_test "x86-64-suffix-intel"
+ run_dump_test "x86-64-default-suffix"
+ run_dump_test "x86-64-default-suffix-avx"
run_dump_test "x86-64-avx512dq-rcigrd-intel"
run_dump_test "x86-64-avx512dq-rcigrd"
run_dump_test "x86-64-avx512dq-rcigrne-intel"
run_dump_test "x86-64-enqcmd"
run_dump_test "x86-64-enqcmd-intel"
run_list_test "x86-64-enqcmd-inval"
+ run_dump_test "x86-64-serialize"
+ run_dump_test "x86-64-tdx"
+ run_dump_test "x86-64-tsxldtrk"
run_dump_test "x86-64-vp2intersect"
run_dump_test "x86-64-vp2intersect-intel"
run_list_test "x86-64-vp2intersect-inval-bcast"
+ run_dump_test "x86-64-keylocker"
+ run_dump_test "x86-64-keylocker-intel"
run_dump_test "x86-64-fence-as-lock-add-yes"
run_dump_test "x86-64-fence-as-lock-add-no"
run_dump_test "x86-64-pr20141"
run_list_test "x86-64-cet-ibt-inval"
run_list_test "x86-64-cet-shstk-inval"
run_dump_test "x86-64-pseudos"
+ run_list_test "x86-64-pseudos-bad"
+ run_list_test "x86-64-inval-pseudo" "-al"
run_dump_test "x86-64-notrack"
run_dump_test "x86-64-notrack-intel"
run_list_test "x86-64-notrackbad" "-al"
run_dump_test "x86-64-movd-intel"
run_dump_test "x86-64-nop-1"
run_dump_test "x86-64-nop-2"
+ run_dump_test "x86-64-movsxd"
+ run_dump_test "x86-64-movsxd-intel"
+ run_list_test "x86-64-movsxd-inval" "-al"
+ run_dump_test "x86-64-movsxd-intel64"
+ run_dump_test "x86-64-movsxd-intel64-intel"
+ run_list_test "x86-64-movsxd-intel64-inval" "-mintel64 -al"
run_dump_test "x86-64-optimize-1"
run_dump_test "x86-64-optimize-2"
run_dump_test "x86-64-optimize-2a"
run_dump_test "x86-64-optimize-2b"
run_dump_test "x86-64-optimize-3"
+ run_dump_test "x86-64-optimize-3b"
run_dump_test "x86-64-optimize-4"
run_dump_test "x86-64-optimize-5"
run_dump_test "x86-64-optimize-6"
run_list_test "x86-64-optimize-7a" "-I${srcdir}/$subdir -march=+noavx -al"
run_dump_test "x86-64-optimize-7b"
run_list_test "x86-64-optimize-8" "-I${srcdir}/$subdir -march=+noavx2 -al"
+ run_dump_test "x86-64-align-branch-1a"
+ run_dump_test "x86-64-align-branch-1b"
+ run_dump_test "x86-64-align-branch-1c"
+ run_dump_test "x86-64-align-branch-1d"
+ run_dump_test "x86-64-align-branch-1e"
+ run_dump_test "x86-64-align-branch-1f"
+ run_dump_test "x86-64-align-branch-1g"
+ run_dump_test "x86-64-align-branch-1h"
+ run_dump_test "x86-64-align-branch-1i"
+ if { ![istarget "*-*-darwin*"] } then {
+ run_dump_test "x86-64-align-branch-2a"
+ run_dump_test "x86-64-align-branch-2b"
+ run_dump_test "x86-64-align-branch-2c"
+ }
+ run_dump_test "x86-64-align-branch-4a"
+ run_dump_test "x86-64-align-branch-4b"
+ run_dump_test "x86-64-align-branch-5"
+ run_dump_test "x86-64-align-branch-6"
+ run_dump_test "x86-64-align-branch-7"
+ run_dump_test "x86-64-align-branch-8"
+ run_dump_test "x86-64-align-branch-9"
+ run_dump_test "x86-64-lfence-load"
+ run_dump_test "x86-64-lfence-indbr-a"
+ run_dump_test "x86-64-lfence-indbr-b"
+ run_dump_test "x86-64-lfence-indbr-c"
+ run_dump_test "x86-64-lfence-ret-a"
+ run_dump_test "x86-64-lfence-ret-b"
+ run_dump_test "x86-64-lfence-ret-c"
+ run_dump_test "x86-64-lfence-ret-d"
+ run_dump_test "x86-64-lfence-ret-e"
+ run_dump_test "x86-64-lfence-byte"
+ run_list_test "x86-64-amx-inval"
+ run_dump_test "x86-64-amx"
+ run_dump_test "x86-64-amx-intel"
+ run_dump_test "x86-64-amx-bad"
if { ![istarget "*-*-aix*"]
&& ![istarget "*-*-beos*"]
run_dump_test "x86-64-relax-2"
run_dump_test "x86-64-relax-3"
+ run_dump_test "x86-64-relax-4"
run_dump_test "x86-64-jump"
run_dump_test "x86-64-branch-2"
- run_list_test "x86-64-branch-3" "-al -mintel64"
+ run_dump_test "x86-64-branch-3"
run_list_test "x86-64-branch-4" "-al -mintel64"
+ run_list_test "x86-64-branch-5" "-al"
run_dump_test "x86-64-gotpcrel"
run_dump_test "x86-64-gotpcrel-no-relax"
run_dump_test "x86-64-nop-4"
run_dump_test "x86-64-nop-5"
run_dump_test "x86-64-nop-6"
+ run_dump_test "x86-64-unique"
- run_dump_test "evex-no-scale-64"
run_dump_test "x86-64-property-1"
run_dump_test "x86-64-property-2"
+ run_dump_test "x86-64-property-3"
+ run_dump_test "x86-64-property-4"
+ run_dump_test "x86-64-property-5"
+ run_dump_test "x86-64-property-6"
+ run_dump_test "x86-64-property-7"
+ run_dump_test "x86-64-property-8"
+ run_dump_test "x86-64-property-9"
+ run_dump_test "x86-64-property-10"
+
+ if {[istarget "*-*-linux*"]} then {
+ run_dump_test "x86-64-align-branch-3"
+ }
+
}
+ set ASFLAGS "$old_ASFLAGS --64"
+
+ run_dump_test "sizing64"
+
set ASFLAGS "$old_ASFLAGS"
}