public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: <kirill.yukhin@intel.com>,<binutils@sourceware.org>
Subject: [PATCH 4/6] x86/MPX: bndmk, bndldx, and bndstx only allow a memory operand
Date: Tue, 08 Oct 2013 14:43:00 -0000	[thread overview]
Message-ID: <5254361802000078000F9A59@nat28.tlf.novell.com> (raw)
In-Reply-To: <5254349502000078000F9A3D@nat28.tlf.novell.com>

[-- Attachment #1: Type: text/plain, Size: 1184 bytes --]

bndmk, bndldx, and bndstx only allow memory operands, so decoding should
use OP_M() instead of OP_E().

opcodes/
2013-10-08  Jan Beulich <jbeulich@suse.com>

	* i386-dis.c (Mv_bnd): New.
	(mod_table): Use it for bndmk, bndldx, and bndstx.

--- 2013-10-07/opcodes/i386-dis.c
+++ 2013-10-07/opcodes/i386-dis.c
@@ -250,6 +250,7 @@ fetch_data (struct disassemble_info *inf
 #define Mo { OP_M, o_mode }
 #define Mp { OP_M, f_mode }		/* 32 or 48 bit memory operand for LDS, LES etc */
 #define Mq { OP_M, q_mode }
+#define Mv_bnd { OP_M, v_bnd_mode }
 #define Mx { OP_M, x_mode }
 #define Mxmm { OP_M, xmm_mode }
 #define Gb { OP_G, b_mode }
@@ -11126,17 +11127,17 @@ static const struct dis386 mod_table[][2
   },
   {
     /* MOD_0F1A_PREFIX_0 */
-    { "bndldx",		{ Gbnd, Ev_bnd } },
+    { "bndldx",		{ Gbnd, Mv_bnd } },
     { "nopQ",		{ Ev } },
   },
   {
     /* MOD_0F1B_PREFIX_0 */
-    { "bndstx",		{ Ev_bnd, Gbnd } },
+    { "bndstx",		{ Mv_bnd, Gbnd } },
     { "nopQ",		{ Ev } },
   },
   {
     /* MOD_0F1B_PREFIX_1 */
-    { "bndmk",		{ Gbnd, Ev_bnd } },
+    { "bndmk",		{ Gbnd, Mv_bnd } },
     { "nopQ",		{ Ev } },
   },
   {




[-- Attachment #2: binutils-mainline-x86-MPX-no-reg.patch --]
[-- Type: text/plain, Size: 1178 bytes --]

bndmk, bndldx, and bndstx only allow memory operands, so decoding should
use OP_M() instead of OP_E().

opcodes/
2013-10-08  Jan Beulich <jbeulich@suse.com>

	* i386-dis.c (Mv_bnd): New.
	(mod_table): Use it for bndmk, bndldx, and bndstx.

--- 2013-10-07/opcodes/i386-dis.c
+++ 2013-10-07/opcodes/i386-dis.c
@@ -250,6 +250,7 @@ fetch_data (struct disassemble_info *inf
 #define Mo { OP_M, o_mode }
 #define Mp { OP_M, f_mode }		/* 32 or 48 bit memory operand for LDS, LES etc */
 #define Mq { OP_M, q_mode }
+#define Mv_bnd { OP_M, v_bnd_mode }
 #define Mx { OP_M, x_mode }
 #define Mxmm { OP_M, xmm_mode }
 #define Gb { OP_G, b_mode }
@@ -11126,17 +11127,17 @@ static const struct dis386 mod_table[][2
   },
   {
     /* MOD_0F1A_PREFIX_0 */
-    { "bndldx",		{ Gbnd, Ev_bnd } },
+    { "bndldx",		{ Gbnd, Mv_bnd } },
     { "nopQ",		{ Ev } },
   },
   {
     /* MOD_0F1B_PREFIX_0 */
-    { "bndstx",		{ Ev_bnd, Gbnd } },
+    { "bndstx",		{ Mv_bnd, Gbnd } },
     { "nopQ",		{ Ev } },
   },
   {
     /* MOD_0F1B_PREFIX_1 */
-    { "bndmk",		{ Gbnd, Ev_bnd } },
+    { "bndmk",		{ Gbnd, Mv_bnd } },
     { "nopQ",		{ Ev } },
   },
   {

  parent reply	other threads:[~2013-10-08 14:43 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-08 14:36 [PATCH 0/6] x86: various MPX fixes Jan Beulich
2013-10-08 14:41 ` [PATCH 1/6] x86/MPX: testsuite adjustments Jan Beulich
2013-10-08 14:41 ` [PATCH 2/6] x86/MPX: fix address size handling Jan Beulich
2013-10-08 15:15   ` H.J. Lu
2013-10-08 15:20     ` Jan Beulich
2013-10-08 15:32       ` H.J. Lu
2013-10-09  7:30         ` Jan Beulich
2013-10-09 15:45           ` H.J. Lu
2013-10-10 12:27             ` Jan Beulich
2013-10-10 15:18               ` H.J. Lu
2013-10-08 14:42 ` [PATCH 3/6] x86/MPX: suppress base/index swapping in Intel mode for bndmk, bndldx, and bndstx Jan Beulich
2013-10-08 15:16   ` H.J. Lu
2013-10-08 15:23     ` Jan Beulich
2013-10-08 15:34       ` H.J. Lu
2013-10-08 16:00         ` Jan Beulich
2013-10-08 16:19           ` H.J. Lu
2013-10-09  7:15             ` acceptance rules (was: Re: [PATCH 3/6] x86/MPX: suppress base/index swapping ...) Jan Beulich
2013-10-09 16:45               ` H.J. Lu
2013-10-08 14:43 ` Jan Beulich [this message]
2013-10-08 15:28   ` [PATCH 4/6] x86/MPX: bndmk, bndldx, and bndstx only allow a memory operand H.J. Lu
2013-10-09  7:24     ` Jan Beulich
2013-10-09 15:17       ` H.J. Lu
2013-10-08 14:43 ` [PATCH 5/6] x86/MPX: fix operand size handling Jan Beulich
2013-10-08 15:45   ` H.J. Lu
2013-10-09  7:36     ` Jan Beulich
2013-10-09 15:51       ` H.J. Lu
2013-10-10 13:14         ` Jan Beulich
2013-10-10 15:14           ` H.J. Lu
2013-10-12 15:58             ` H.J. Lu
2013-10-12 17:12               ` H.J. Lu
2013-10-08 14:44 ` [PATCH 6/6] x86/MPX: bndmk, bndldx, and bndstx don't allow RIP-relative addressing Jan Beulich
2013-10-08 16:13   ` H.J. Lu
2013-10-09  7:40     ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5254361802000078000F9A59@nat28.tlf.novell.com \
    --to=jbeulich@suse.com \
    --cc=binutils@sourceware.org \
    --cc=hjl.tools@gmail.com \
    --cc=kirill.yukhin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).