aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2018-05-07 09:57:06 -0700
committerH.J. Lu <hjl.tools@gmail.com>2018-05-07 09:57:06 -0700
commit75c0a438994f00240ecd1baca3e3c11cc3b219e5 (patch)
tree44e13c8f0315ab6e42c9faea4ce15fdbf3f8c7ff /gas
parentaff689d36d66dd45a59008f3778d3d22e3cfcb9b (diff)
downloadfsf-binutils-gdb-75c0a438994f00240ecd1baca3e3c11cc3b219e5.zip
fsf-binutils-gdb-75c0a438994f00240ecd1baca3e3c11cc3b219e5.tar.gz
fsf-binutils-gdb-75c0a438994f00240ecd1baca3e3c11cc3b219e5.tar.bz2
x86: Replace AddrPrefixOp0 with AddrPrefixOpReg
This patch replaces AddrPrefixOp0 with AddrPrefixOpReg to indicate that the size of register operand is controlled by the address size prefix. This will be used by Intel MOVDIRI and MOVDIR64B instructions later. gas/ * config/tc-i386.c (process_suffix): Check addrprefixopreg instead of addrprefixop0. opcodes/ * i386-gen.c (opcode_modifiers): Replace AddrPrefixOp0 with AddrPrefixOpReg. * i386-opc.h (AddrPrefixOp0): Renamed to ... (AddrPrefixOpReg): This. (i386_opcode_modifier): Rename addrprefixop0 to addrprefixopreg. * i386-opc.tbl: Replace AddrPrefixOp0 with AddrPrefixOpReg.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-i386.c10
2 files changed, 12 insertions, 3 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 53c1751..fe622f8 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2018-05-07 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c (process_suffix): Check addrprefixopreg
+ instead of addrprefixop0.
+
2018-05-07 Peter Bergner <bergner@vnet.ibm.com.com>
* config/tc-ppc.c (ppc_setup_opcodes) <powerpc_opcodes>: Rewrite code
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index cd53fa46..b4c93a2 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -5997,14 +5997,18 @@ process_suffix (void)
/* Now select between word & dword operations via the operand
size prefix, except for instructions that will ignore this
prefix anyway. */
- if (i.tm.opcode_modifier.addrprefixop0)
+ if (i.reg_operands > 0
+ && i.types[0].bitfield.reg
+ && i.tm.opcode_modifier.addrprefixopreg
+ && (i.tm.opcode_modifier.immext
+ || i.operands == 1))
{
/* The address size override prefix changes the size of the
first operand. */
if ((flag_code == CODE_32BIT
- && i.op->regs[0].reg_type.bitfield.word)
+ && i.op[0].regs->reg_type.bitfield.word)
|| (flag_code != CODE_32BIT
- && i.op->regs[0].reg_type.bitfield.dword))
+ && i.op[0].regs->reg_type.bitfield.dword))
if (!add_prefix (ADDR_PREFIX_OPCODE))
return 0;
}