diff options
author | Indu Bhagat <indu.bhagat@oracle.com> | 2024-01-15 01:00:23 -0800 |
---|---|---|
committer | Indu Bhagat <indu.bhagat@oracle.com> | 2024-01-15 03:31:35 -0800 |
commit | 3037cefe56affe48ac53d85b9e33c2c3a408c41f (patch) | |
tree | 519641eb4975432d6d48744b50c273e25fb8062e /opcodes/i386-opc.h | |
parent | c02a969de74ae3118f4a66ae76860ad21603fc44 (diff) | |
download | gdb-3037cefe56affe48ac53d85b9e33c2c3a408c41f.zip gdb-3037cefe56affe48ac53d85b9e33c2c3a408c41f.tar.gz gdb-3037cefe56affe48ac53d85b9e33c2c3a408c41f.tar.bz2 |
opcodes: gas: x86: define and use Rex2 as attribute not constraint
Rex2 is currently an operand constraint. For the upcoming SCFI
implementation in GAS, we need to identify operations which implicitly
update the stack pointer. An operand constraint enumerator for implicit
stack op seems more appropriate than an attribute. However, two opcodes
currently necessitate both Rex2 and an implicit stack op marker; this
prompts revisiting the current representations a bit.
Make Rex2 a standalone attribute, so that later a new operand constraint
may be added for IMPLICIT_STACK_OP.
ChangeLog:
* gas/config/tc-i386.c (is_apx_rex2_encoding): Update the check.
* opcodes/i386-gen.c: Add a new BITFIELD for Rex2.
* opcodes/i386-opc.h (REX2_REQUIRED): Remove.
* opcodes/i386-opc.tbl: Remove Rex2 operand constraint.
* opcodes/i386-tbl.h: Regenerated.
Diffstat (limited to 'opcodes/i386-opc.h')
-rw-r--r-- | opcodes/i386-opc.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/opcodes/i386-opc.h b/opcodes/i386-opc.h index 61a1121..889636e 100644 --- a/opcodes/i386-opc.h +++ b/opcodes/i386-opc.h @@ -579,8 +579,6 @@ enum /* Instrucion requires that destination must be distinct from source registers. */ #define DISTINCT_DEST 9 - /* Instrucion requires REX2 prefix. */ -#define REX2_REQUIRED 10 OperandConstraint, /* instruction ignores operand size prefix and in Intel mode ignores mnemonic size suffix check. */ @@ -750,6 +748,9 @@ enum /* No CSPAZO flags update indication. */ NF, + /* Instrucion requires REX2 prefix. */ + Rex2, + /* The last bitfield in i386_opcode_modifier. */ Opcode_Modifier_Num }; @@ -796,6 +797,7 @@ typedef struct i386_opcode_modifier unsigned int isa64:2; unsigned int noegpr:1; unsigned int nf:1; + unsigned int rex2:1; } i386_opcode_modifier; /* Operand classes. */ |