This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: Set vex.w to 0
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 11 Dec 2009 17:18:39 -0800
- Subject: Re: PATCH: Set vex.w to 0
- References: <20091212001226.GA9283@lucon.org>
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
On Fri, Dec 11, 2009 at 04:12:26PM -0800, H.J. Lu wrote:
> I am checking in this patch to set vex.w to 0.
>
> H.J.
> diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
> index 8a605d2..5bebff2 100644
> --- a/opcodes/ChangeLog
> +++ b/opcodes/ChangeLog
> @@ -1,3 +1,7 @@
> +2009-12-11 H.J. Lu <hongjiu.lu@intel.com>
> +
> + * i386-dis.c (print_insn): Set vex.w to 0.
> +
> 2009-12-11 Quentin Neill <quentin.neill@amd.com>
>
> * i386-dis.c (get_vex_imm8): Extend logic to apply in all cases,
> diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
> index 76b7679..cff2f46 100644
> --- a/opcodes/i386-dis.c
> +++ b/opcodes/i386-dis.c
> @@ -10786,6 +10786,7 @@ print_insn (bfd_vma pc, disassemble_info *info)
>
> need_vex = 0;
> need_vex_reg = 0;
> + vex.w = 0;
> vex_w_done = 0;
>
> if (dp->name == NULL && dp->op[0].bytemode == FLOATCODE)
We only need to set vex.w to 0 for VEX C5 prefix. I checked in this
patch to do that.
H.J.
---
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 5bebff2..38bb872 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,5 +1,11 @@
2009-12-11 H.J. Lu <hongjiu.lu@intel.com>
+ * i386-dis.c (get_valid_dis386): Set vex.w to 0 for VEX C5
+ prefix.
+ (print_insn): Don't set vex.w here.
+
+2009-12-11 H.J. Lu <hongjiu.lu@intel.com>
+
* i386-dis.c (print_insn): Set vex.w to 0.
2009-12-11 Quentin Neill <quentin.neill@amd.com>
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index cff2f46..8de11e2 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -10460,6 +10460,8 @@ get_valid_dis386 (const struct dis386 *dp, disassemble_info *info)
&& vex.register_specifier > 0x7)
BadOp ();
+ vex.w = 0;
+
vex.length = (*codep & 0x4) ? 256 : 128;
switch ((*codep & 0x3))
{
@@ -10786,7 +10788,6 @@ print_insn (bfd_vma pc, disassemble_info *info)
need_vex = 0;
need_vex_reg = 0;
- vex.w = 0;
vex_w_done = 0;
if (dp->name == NULL && dp->op[0].bytemode == FLOATCODE)