]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
opcodes: gas: x86: define and use Rex2 as attribute not constraint
authorIndu Bhagat <indu.bhagat@oracle.com>
Mon, 15 Jan 2024 09:00:23 +0000 (01:00 -0800)
committerIndu Bhagat <indu.bhagat@oracle.com>
Mon, 15 Jan 2024 11:31:35 +0000 (03:31 -0800)
commit3037cefe56affe48ac53d85b9e33c2c3a408c41f
tree519641eb4975432d6d48744b50c273e25fb8062e
parentc02a969de74ae3118f4a66ae76860ad21603fc44
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.
gas/config/tc-i386.c
opcodes/i386-gen.c
opcodes/i386-opc.h
opcodes/i386-opc.tbl
opcodes/i386-tbl.h