From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23969 invoked by alias); 9 Oct 2013 07:24:32 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 23954 invoked by uid 89); 9 Oct 2013 07:24:31 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: nat28.tlf.novell.com Received: from nat28.tlf.novell.com (HELO nat28.tlf.novell.com) (130.57.49.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 09 Oct 2013 07:24:30 +0000 Received: from EMEA1-MTA by nat28.tlf.novell.com with Novell_GroupWise; Wed, 09 Oct 2013 08:24:28 +0100 Message-Id: <525520C902000078000F9DBE@nat28.tlf.novell.com> Date: Wed, 09 Oct 2013 07:24:00 -0000 From: "Jan Beulich" To: "H.J. Lu" Cc: ,"Binutils" Subject: Re: [PATCH 4/6] x86/MPX: bndmk, bndldx, and bndstx only allow a memory operand References: <5254349502000078000F9A3D@nat28.tlf.novell.com> <5254361802000078000F9A59@nat28.tlf.novell.com> In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-SW-Source: 2013-10/txt/msg00106.txt.bz2 >>> On 08.10.13 at 17:28, "H.J. Lu" wrote: > On Tue, Oct 8, 2013 at 7:43 AM, Jan Beulich wrote: >> bndmk, bndldx, and bndstx only allow memory operands, so decoding should >> use OP_M() instead of OP_E(). >=20 > The change isn't wrong. But register operand will never be used since > MOD !=3D 3. Also, in this case, only register operand is possible for nop > since MOD =3D=3D 0x3. If we want to make the change, we should also > replace Ev with Gv. Looks like I didn't look at mod_table[]'s usage closely enough - I guess for consistency reasons I'll withdraw the patch rather than extending it (even though performance would perhaps be slightly improved by using the more specific operand handling routines here, but that would be the case for various other code paths / table entries too I believe). Jan >> opcodes/ >> 2013-10-08 Jan Beulich >> >> * 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 f= or=20 > 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 } }, >> }, >> { >> >=20 >=20 >=20 > --=20 > H.J.