[PATCH 3/6] x86: harmonize disp with imm handling
Jan Beulich
jbeulich@suse.com
Thu Jun 17 14:57:46 GMT 2021
On 17.06.2021 16:46, H.J. Lu wrote:
> On Mon, Jun 14, 2021 at 3:25 AM Jan Beulich <jbeulich@suse.com> wrote:
>> --- /dev/null
>> +++ b/gas/testsuite/gas/i386/disp-imm-32.s
>> @@ -0,0 +1,17 @@
>> + .text
>> +disp_imm:
>> + mov -0xffffffff(%eax), %eax
>
> I don't think we should treat -0xffffffff(%eax) as 1(%eax).
> We allow addresses to wraparound. I don't see a need for
> displacements to wraparound.
This then is entirely unexpected to the programmer. In fact the
same (abstracted away behind some defines or equates) constant
could be used for both purposes (and should be usable both ways,
imo).
Jan
More information about the Binutils
mailing list