[PATCH] x86: Add Evw to emit w suffix for several instrctions for word ptr

Jan Beulich jbeulich@suse.com
Fri May 26 10:52:15 GMT 2023


On 26.05.2023 10:54, Jiang, Haochen wrote:
>> On 26.05.2023 10:26, Haochen Jiang wrote:
>>> Currently, for instructions lldt/ltr/verr/verw/lkgs, we are missing w
>>> suffix for memory operands like sldt/str do. Also the Ew usage is not
>>> that precise under this scenario. Add Evw to fix this problem.
>>
>> So why not Sv? It's used solely for segment register moves, sldt, str, and
>> smsw right now. We're aiming for consistency among all insns loading /
>> storing segment selector values (and smsw fits that pattern, but note that
>> lmsw does not), so introducing a new Evw can't be the solution (or else Sv
>> users would also need switching).
> 
> There is a little difference between lldt/ltr/lkgs/verr/verw and sldt/str. We need
> to fix the register to 16 bit while sldt/str did not. That is why I am not using Sv. Sv
> will emit 'lldt %eax' but not 'lldt %ax' for current testcases and I suppose that is not
> desired. 

Did you read my reply on one of the "Support Intel FRED LKGS" threads,
which I think I sent before this patch was sent? I do not follow why
you think "we need to fix the register to 16 bit".

Jan


More information about the Binutils mailing list