i386-dis: Add 2 tests with invalid bnd register
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 15 Jun 2017 15:21:48 +0000 (08:21 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 15 Jun 2017 15:21:48 +0000 (08:21 -0700)
PR binutils/21594
* testsuite/gas/i386/mpx.s: Add 2 tests with invalid bnd
register.
* testsuite/gas/i386/x86-64-mpx.s: Likewise.
* testsuite/gas/i386/mpx.d: Updated.
* testsuite/gas/i386/x86-64-mpx.d: Likewise.

gas/ChangeLog
gas/testsuite/gas/i386/mpx.d
gas/testsuite/gas/i386/mpx.s
gas/testsuite/gas/i386/x86-64-mpx.d
gas/testsuite/gas/i386/x86-64-mpx.s

index f4506ce10c6d468d0a1e504491f324c329da67e6..38ffc663396ae97042c1bb3dcf0af64601e77380 100644 (file)
@@ -1,3 +1,12 @@
+2017-06-15  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR binutils/21594
+       * testsuite/gas/i386/mpx.s: Add 2 tests with invalid bnd
+       register.
+       * testsuite/gas/i386/x86-64-mpx.s: Likewise.
+       * testsuite/gas/i386/mpx.d: Updated.
+       * testsuite/gas/i386/x86-64-mpx.d: Likewise.
+
 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
 
        * config/tc-xtensa.c (density_supported, xtensa_fetch_width,
index 0e84b9bd1fb73b4d2d0c497de5a2c500f2ea333c..c7c08adc2c3dca49ea8b5a611739e85eef08301b 100644 (file)
@@ -130,4 +130,8 @@ Disassembly of section .text:
 
 [a-f0-9]+ <foo>:
 [      ]*[a-f0-9]+:    f2 c3                   bnd ret 
+
+[a-f0-9]+ <bad>:
+[      ]*[a-f0-9]+:    0f 1a 30                bndldx \(%eax\),\(bad\)
+[      ]*[a-f0-9]+:    66 0f 1a c4             bndmov \(bad\),%bnd0
 #pass
index 3d1b5d07ee8884d1e98a67e16a4a2e0aca7996aa..1ae51fca84f63d090bb23c8f9673aa9598ac8e68 100644 (file)
@@ -157,3 +157,15 @@ start:
        bnd ret
 
 foo:   bnd ret
+
+bad:
+       # bndldx (%eax),(bad)
+       .byte 0x0f
+       .byte 0x1a
+       .byte 0x30
+
+       # bndmov (bad),%bnd0
+       .byte 0x66
+       .byte 0x0f
+       .byte 0x1a
+       .byte 0xc4
index b7986494bd4e3350352cdb2ebdaacd6e43db6210..e2a7828b69d4f9dfe8e004202da71efc475ad114 100644 (file)
@@ -182,4 +182,8 @@ Disassembly of section .text:
 
 [a-f0-9]+ <foo>:
 [      ]*[a-f0-9]+:    f2 c3                   bnd retq 
+
+[a-f0-9]+ <bad>:
+[      ]*[a-f0-9]+:    0f 1a 30                bndldx \(%rax\),\(bad\)
+[      ]*[a-f0-9]+:    66 0f 1a c4             bndmov \(bad\),%bnd0
 #pass
index 0db4bdc022d3470f1778c60ff47ee7598053c69b..1263408f3d9518f5ec425a9e644830eb90340b27 100644 (file)
@@ -209,3 +209,15 @@ start:
        bnd ret
 
 foo:   bnd ret
+
+bad:
+       # bndldx (%eax),(bad)
+       .byte 0x0f
+       .byte 0x1a
+       .byte 0x30
+
+       # bndmov (bad),%bnd0
+       .byte 0x66
+       .byte 0x0f
+       .byte 0x1a
+       .byte 0xc4