aboutsummaryrefslogtreecommitdiff
path: root/opcodes/i386-opc.h
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2019-07-16 09:31:36 +0200
committerJan Beulich <jbeulich@suse.com>2019-07-16 09:31:36 +0200
commitdfd6917457a3030ea4a4b6356f65216fab92d0b8 (patch)
tree564ff316e799585e35f21a1cec2393a4d5d11e4d /opcodes/i386-opc.h
parent21df382b918888de64749e977f185c4e10a5b838 (diff)
downloadgdb-dfd6917457a3030ea4a4b6356f65216fab92d0b8.zip
gdb-dfd6917457a3030ea4a4b6356f65216fab92d0b8.tar.gz
gdb-dfd6917457a3030ea4a4b6356f65216fab92d0b8.tar.bz2
x86: make RegMem an opcode modifier
... instead of an operand type bit: It's an insn property, not an operand one. There's just one actual change to be made to the templates: Most are now required to have the (unswapped) destination go into ModR/M.rm, so VMOVD template needs its opcode adjusted accordingly and its operands swapped. {,V}MOVS{S,D}, otoh, are left alone in this regard, as otherwise generated code would differ from what we've been producing so far (which I don't think is wanted). Take the opportunity and add a missing IgnoreSize to pextrb (leading to an error in 16-bit mode), and take the liberty to once again drop stray IgnoreSize attributes from lines changed and neighboring related ones.
Diffstat (limited to 'opcodes/i386-opc.h')
-rw-r--r--opcodes/i386-opc.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/opcodes/i386-opc.h b/opcodes/i386-opc.h
index a2816a1..4c38e9e 100644
--- a/opcodes/i386-opc.h
+++ b/opcodes/i386-opc.h
@@ -437,6 +437,11 @@ enum
FWait,
/* quick test for string instructions */
IsString,
+ /* RegMem is for instructions with a modrm byte where the register
+ destination operand should be encoded in the mod and regmem fields.
+ Normally, it will be encoded in the reg field. We add a RegMem
+ flag to indicate that it should be encoded in the regmem field. */
+ RegMem,
/* quick test if branch instruction is MPX supported */
BNDPrefixOk,
/* quick test if NOTRACK prefix is supported */
@@ -649,6 +654,7 @@ typedef struct i386_opcode_modifier
unsigned int no_ldsuf:1;
unsigned int fwait:1;
unsigned int isstring:1;
+ unsigned int regmem:1;
unsigned int bndprefixok:1;
unsigned int notrackprefixok:1;
unsigned int islockable:1;
@@ -751,12 +757,6 @@ enum
JumpAbsolute,
/* String insn operand with fixed es segment */
EsSeg,
- /* RegMem is for instructions with a modrm byte where the register
- destination operand should be encoded in the mod and regmem fields.
- Normally, it will be encoded in the reg field. We add a RegMem
- flag to the destination register operand to indicate that it should
- be encoded in the regmem field. */
- RegMem,
/* Memory. */
Mem,
/* BYTE size. */
@@ -828,7 +828,6 @@ typedef union i386_operand_type
unsigned int shiftcount:1;
unsigned int jumpabsolute:1;
unsigned int esseg:1;
- unsigned int regmem:1;
unsigned int byte:1;
unsigned int word:1;
unsigned int dword:1;