]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
x86: default to not accepting MPX insns
authorJan Beulich <jbeulich@suse.com>
Mon, 2 Dec 2024 08:39:23 +0000 (09:39 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 2 Dec 2024 08:39:23 +0000 (09:39 +0100)
Gcc9 had MPX support removed. While we don't want to remove support,
require these deprecated insns (and registers) to be enabled explicitly.

30 files changed:
gas/testsuite/gas/i386/bnd.l
gas/testsuite/gas/i386/bnd.s
gas/testsuite/gas/i386/got-no-relax.d
gas/testsuite/gas/i386/got.d
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/lfence-load.d
gas/testsuite/gas/i386/mpx-16bit.d
gas/testsuite/gas/i386/mpx-add-bnd-prefix.d
gas/testsuite/gas/i386/mpx.d
gas/testsuite/gas/i386/notrack-intel.d
gas/testsuite/gas/i386/notrack.d
gas/testsuite/gas/i386/opts-intel.d
gas/testsuite/gas/i386/opts.d
gas/testsuite/gas/i386/pseudos.d
gas/testsuite/gas/i386/solaris/x86-64-mpx-branch-1.d
gas/testsuite/gas/i386/solaris/x86-64-mpx-branch-2.d
gas/testsuite/gas/i386/sse2avx-opts-intel.d
gas/testsuite/gas/i386/sse2avx-opts.d
gas/testsuite/gas/i386/x86-64-lfence-load.d
gas/testsuite/gas/i386/x86-64-mpx-add-bnd-prefix.d
gas/testsuite/gas/i386/x86-64-mpx-addr32.d
gas/testsuite/gas/i386/x86-64-mpx-branch-1.d
gas/testsuite/gas/i386/x86-64-mpx-branch-2.d
gas/testsuite/gas/i386/x86-64-mpx.d
gas/testsuite/gas/i386/x86-64-notrack-intel.d
gas/testsuite/gas/i386/x86-64-notrack.d
gas/testsuite/gas/i386/x86-64-pseudos.d
gas/testsuite/gas/i386/x86-64.exp
opcodes/i386-gen.c
opcodes/i386-init.h

index c9377d8c4b2a2d0c6fac2bad2fb2ea9476641239..b70fe9c1522cd74998ffd5b8d32418f3795a550d 100644 (file)
@@ -1,14 +1,12 @@
 .*: Assembler messages:
-.*:6: Error: .*`bndmov'.*
+.*:5: Error: .*`bndmov'.*
 GAS LISTING .*
 
 
 [      ]*1[    ]+\.text
 [      ]*2[    ]+\.intel_syntax noprefix
-[      ]*3[    ]+\.arch generic32
-[      ]*4[    ]+bnd:
-[      ]*5[    ]+\?\?\?\? A1000000[    ]+mov   eax, bnd0
-[      ]*5[    ]+00
-[      ]*6[    ]+bndmov        bnd0, bnd0
-[      ]*7[    ]+\?\?\?\? 00000000             \.p2align 4,0
-#...
+[      ]*3[    ]+bnd:
+[      ]*4[    ]+\?\?\?\? A1000000[    ]+mov   eax, bnd0
+[      ]*4[    ]+00
+[      ]*5[    ]+bndmov        bnd0, bnd0
+#pass
index e2c61bf4ed071c258f57d14f3dd93c5e8641ccdc..63d3aed12820a086b2ee73f1d8a92853fec04cea 100644 (file)
@@ -1,6 +1,5 @@
        .text
        .intel_syntax noprefix
-       .arch generic32
 bnd:
        mov     eax, bnd0
        bndmov  bnd0, bnd0
index 41b4adfc4317f32f45f6bedd967a287f1b50517b..acc8055e880a6131f8c652c73886267dbd136f2a 100644 (file)
@@ -1,5 +1,5 @@
 #source: got.s
-#as: -mrelax-relocations=no
+#as: -mrelax-relocations=no -march=+mpx
 #objdump: -dwr
 
 .*: +file format .*
index 351da27e046825ced95f6cde8470779529638621..9610e2cf2c05cfec33f3a344004d013d3854335d 100644 (file)
@@ -1,4 +1,4 @@
-#as: -mrelax-relocations=yes
+#as: -mrelax-relocations=yes -march=+mpx
 #objdump: -dwr
 
 .*: +file format .*
index 0a48b4eb0f1035a7f28c5c9abf6b31fb9185d816..34352026ccca6c9b5162cc49554b5316e96c8023 100644 (file)
@@ -68,7 +68,7 @@ if [gas_32_check] then {
     run_dump_test "intelok"
     run_dump_test "intelok2"
     run_dump_test "prefix"
-    run_list_test "prefix32" "-al"
+    run_list_test "prefix32" "-al -march=+mpx"
     run_dump_test "insn-32"
     run_dump_test "lea"
     run_dump_test "lea16"
@@ -374,8 +374,8 @@ if [gas_32_check] then {
     run_dump_test "prefetch-intel"
     run_dump_test "smap"
     run_dump_test "mpx"
-    run_list_test "mpx-inval-1" "-al"
-    run_list_test "mpx-inval-2" "-al"
+    run_list_test "mpx-inval-1" "-al -march=+mpx"
+    run_list_test "mpx-inval-2" "-al -march=+mpx"
     run_dump_test "mpx-add-bnd-prefix"
     run_dump_test "mpx-16bit"
     run_list_test "bnd" "-al"
index eb94bdcbb6890002a17cd74a5a745251f20a70c3..a315be75254016941debaad2362d4a2a863059d2 100644 (file)
@@ -1,4 +1,4 @@
-#as: -mlfence-after-load=yes
+#as: -mlfence-after-load=yes -march=+mpx
 #objdump: -dw
 #warning_output: lfence-load.e
 #name: -mlfence-after-load=yes
index b26bc1ae1df318353f60fffada923596d3893380..a38e46ec8c5ea1310ba99858dbe8525440383546 100644 (file)
@@ -1,4 +1,4 @@
-#as: -I${srcdir}/$subdir
+#as: -I${srcdir}/$subdir -march=+mpx
 #objdump: -drw -Mi8086
 #name: i386 MPX (16-bit)
 
index 5ba3ca56816a813e65a147d464c795ce8fda269b..6e18f61ba0533c5ca76d0a1b5871edab7dd87ebe 100644 (file)
@@ -1,4 +1,4 @@
-#as: -madd-bnd-prefix
+#as: -madd-bnd-prefix -march=+mpx
 #warning_output: mpx-add-bnd-prefix.e
 #objdump: -drw
 #name: Check -madd-bnd-prefix
index a12081c63582752c27d0e9e696a0a307e45e5328..a1e2f8f85a9ef0d6c07e18cdce59e077f056d19a 100644 (file)
@@ -1,3 +1,4 @@
+#as: -march=+mpx
 #objdump: -drw
 #name: i386 MPX
 
index 7b72a39fd73df52a8996f0bf111ab0902a0ba8be..611e846b4ab32cf77d43ac956a61d3f54fa57e64 100644 (file)
@@ -1,5 +1,6 @@
 #source: notrack.s
 #objdump: -dw -Mintel
+#as: -march=+mpx
 #name: i386 NOTRACK prefix (Intel disassembly)
 
 .*: +file format .*
index 1208c922e6b898f7f6ea87b410ab61cab84722e6..b220d05af11d4e53b97ce73493f4fd2e859adbb2 100644 (file)
@@ -1,4 +1,5 @@
 #objdump: -dw
+#as: -march=+mpx
 #name: i386 NOTRACK prefix
 
 .*: +file format .*
index 4172e93c39ee55f32ed8c626e5721fd98f74ce85..281f7097d8d06f25877fd64a1b4b644b9e22af09 100644 (file)
@@ -1,4 +1,5 @@
 #objdump: -drwMintel,suffix
+#as: -march=+mpx
 #name: encoding option (Intel mode)
 #source: opts.s
 
index 73d2a6ef5444343cf5d3fe01df9a053177defc4c..ac9becac2c1a2dc1b02901ddba26704b7ca1742a 100644 (file)
@@ -1,4 +1,5 @@
 #objdump: -drwMsuffix
+#as: -march=+mpx
 #name: encoding option
 
 .*: +file format .*
index 98e1149c19bd24b8de3df7aa22557940ec3e295a..47dca19e9a29f879f0844440f627d5e80cc083d4 100644 (file)
@@ -1,4 +1,4 @@
-#as: -O0
+#as: -O0 -march=+mpx
 #objdump: -drw
 #name: pseudo prefixes
 
index 0db4c04a1f8dcc95bc6f0562d79779a3bb8a7066..cdd46f91748250b139bfc609e532aa6849b01d13 100644 (file)
@@ -1,4 +1,4 @@
-#as: -J
+#as: -J -march=+mpx
 #source: ../x86-64-mpx-branch-1.s
 #objdump: -dwr
 #name: x86-64 MPX branch
index b6ff92c170031462dd5422a155c5ff738f662900..4bcb00ea11f71f8b36111e28bf289a8b47bf3911 100644 (file)
@@ -1,4 +1,4 @@
-#as: -J -madd-bnd-prefix
+#as: -J -madd-bnd-prefix -march=+mpx
 #source: ../x86-64-mpx-branch-1.s
 #objdump: -dwr
 #name: x86-64 branch with BND prefix
index 6f9d30dabe9b7964db9a7e029fa10b5cf3169efa..6dc8b2f02400c859700b66e91ab653a19ecaa96f 100644 (file)
@@ -1,4 +1,4 @@
-#as: -msse2avx
+#as: -msse2avx -march=+mpx
 #objdump: -drwMintel,suffix
 #name: encoding option with -msse2avx (Intel mode)
 #source: opts.s
index 48e0933474b3807034c720bca38077a219ba446f..e1306de54dd170a52e1dbd709bdc60917b946cd0 100644 (file)
@@ -1,4 +1,4 @@
-#as: -msse2avx
+#as: -msse2avx -march=+mpx
 #objdump: -drwMsuffix
 #name: encoding option with -msse2avx
 #source: opts.s
index 726236826e8bec0d7d67fdf5ad3434640c15f851..dcfa810a513f1d315c1765d8938d635c0085c806 100644 (file)
@@ -1,4 +1,4 @@
-#as: -mlfence-after-load=yes
+#as: -mlfence-after-load=yes -march=+mpx
 #objdump: -dw
 #warning_output: lfence-load.e
 #name: x86-64 -mlfence-after-load=yes
index 1bbec106e0004f547d3cefb6c7b621fec77b5c68..7f3458cf20055bf8cc58ce21f4bdf29ece9a66b7 100644 (file)
@@ -1,4 +1,4 @@
-#as: -madd-bnd-prefix
+#as: -madd-bnd-prefix -march=+mpx
 #warning_output: x86-64-mpx-add-bnd-prefix.e
 #objdump: -drw
 #name: Check -madd-bnd-prefix (x86-64)
index cb53535eb0a77be804a3f39b76b020646adc08a6..593029709f05a9a23eeb86e4b50d92e18b47a52a 100644 (file)
@@ -1,3 +1,4 @@
+#as: -march=+mpx
 #objdump: -drw
 #name: x86-64 MPX addr32 tests
 
index 795f3fdacc4f2f4dc86cb77c470b48049c2fc82e..2ae13ca64c6c867983450d6f01791b24ecbcb1f3 100644 (file)
@@ -1,4 +1,4 @@
-#as: -J
+#as: -J -march=+mpx
 #objdump: -dwr
 #name: x86-64 MPX branch
 #notarget: *-*-solaris*
index c61b3af69e8023d80cc37b92afe6f473db8b0868..f5fdb4fa98534844b6ab21d3bb7d66d65f286474 100644 (file)
@@ -1,4 +1,4 @@
-#as: -J -madd-bnd-prefix
+#as: -J -madd-bnd-prefix -march=+mpx
 #objdump: -dwr
 #name: x86-64 branch with BND prefix
 #dump: x86-64-mpx-branch-1.d
index 0794e7ec9be721a9c7c8e91c255ca92aec15a1ef..67c2d837ac19ee0b16123b49b1c73a733b454470 100644 (file)
@@ -1,3 +1,4 @@
+#as: -march=+mpx
 #objdump: -drw
 #name: x86-64 MPX
 
index b9967908324647b270dc5188fc3eb41d764ed902..628669f2ddfabb7da160d472c8c4958bf46bbb4d 100644 (file)
@@ -1,4 +1,5 @@
 #source: x86-64-notrack.s
+#as: -march=+mpx
 #objdump: -dw -Mintel
 #name: x86-64 NOTRACK prefix (Intel disassembly)
 
index 4c258ded2dacb7659a53effdeae26238cf4a57c5..76108b6114f8be1e6a20221c86c5528c594e48d9 100644 (file)
@@ -1,3 +1,4 @@
+#as: -march=+mpx
 #objdump: -dw
 #name: x86-64 NOTRACK prefix
 
index c55e6f4b7aa3fbdb77fb9dd3a34cecd72323c8e4..ea5a3585c37007b5bdebe9792d5d746ca5b02aa2 100644 (file)
@@ -1,4 +1,4 @@
-#as: -O0
+#as: -O0 -march=+mpx
 #objdump: -drw
 #name: x86-64 pseudo prefixes
 
index e59daec551499cafc60d3301864b7d527fb7c04f..fee227d2a4d7826f086e8b66f4c378f009fe2ce6 100644 (file)
@@ -172,7 +172,7 @@ run_list_test "x86-64-specific-reg"
 run_list_test "suffix-bad"
 run_list_test "x86-64-suffix-bad"
 run_list_test "unspec64" ""
-run_list_test "prefix64" "-al"
+run_list_test "prefix64" "-al -march=+mpx"
 run_list_test "oversized64" "-al --divide"
 run_dump_test "x86-64-fxsave"
 run_dump_test "x86-64-fxsave-intel"
@@ -307,8 +307,8 @@ run_dump_test "x86-64-prefetch"
 run_dump_test "x86-64-prefetch-intel"
 run_dump_test "x86-64-smap"
 run_dump_test "x86-64-mpx"
-run_list_test "x86-64-mpx-inval-1" "-al"
-run_list_test "x86-64-mpx-inval-2" "-al"
+run_list_test "x86-64-mpx-inval-1" "-al -march=+mpx"
+run_list_test "x86-64-mpx-inval-2" "-al -march=+mpx"
 run_dump_test "x86-64-mpx-addr32"
 run_dump_test "x86-64-mpx-add-bnd-prefix"
 run_dump_test "x86-64-sha"
index 5a3b1566e98723fe57dc75ddb0ea95c628701abc..bb10ae8b621aec6c19705b129c4c35a970955b60 100644 (file)
@@ -47,7 +47,7 @@ typedef struct dependency
 static const dependency isa_dependencies[] =
 {
   { "UNKNOWN",
-    "~IAMCU" },
+    "~(IAMCU|MPX)" },
   { "GENERIC32",
     "386" },
   { "GENERIC64",
index 8b54d17266c9e28c2fe64641a7e3d909ae6919d5..3d12c6bd0129d6ab7b043289db334cb31f3ae3f6 100644 (file)
 #define CPU_UNKNOWN_FLAGS \
   { { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \
       1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, \
-      1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \
+      1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, \
       1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \
       1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \
       1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \