[PATCH, V4 09/14] opcodes: i386: new marker for insns that implicitly update stack pointer
Jan Beulich
jbeulich@suse.com
Mon Jan 8 08:12:45 GMT 2024
On 06.01.2024 11:08, Indu Bhagat wrote:
> On 1/5/24 06:05, Jan Beulich wrote:
>> On 03.01.2024 08:43, Indu Bhagat wrote:
>>> --- a/opcodes/i386-opc.h
>>> +++ b/opcodes/i386-opc.h
>>> @@ -750,6 +750,9 @@ enum
>>> /* No CSPAZO flags update indication. */
>>> NF,
>>>
>>> + /* Instruction updates stack pointer implicitly. */
>>> + ImplicitStackOp,
>>> +
>>> /* The last bitfield in i386_opcode_modifier. */
>>> Opcode_Modifier_Num
>>> };
>>> @@ -796,6 +799,7 @@ typedef struct i386_opcode_modifier
>>> unsigned int isa64:2;
>>> unsigned int noegpr:1;
>>> unsigned int nf:1;
>>> + unsigned int implicitstackop:1;
>>> } i386_opcode_modifier;
>>
>> I'm not happy to see a new attribute be introduced for this (a new
>> OperandConstraint enumerator would seem more appropriate), while at
>> the same time I can see that the Rex2 attribute used in two of the
>> affected insns presently makes this impossible. However, with no
>> other way out, I'd rather see Rex2 become a standalone attribute,
>> and this one be another operand constraint.
>>
>
> To be sure I understand clearly, the ask here is to:
> - Use unsigned int rex2:1 in struct i386_opcode_modifier instead
> - Add a new OperandConstraint=IMPLICIT_STACK_OP
> - Remove the OperandConstraint=REX2_REQUIRED
>
> Is this right ?
Yes, that would be my personal preference. (Subsequently I'll likely
see about replacing Rex2 again.)
Jan
More information about the Binutils
mailing list