Preventing x86 instruction length optimizations
Jan Beulich
JBeulich@novell.com
Tue Dec 6 16:21:00 GMT 2005
>>> Florian Weimer <fw@deneb.enyo.de> 06.12.05 17:04:09 >>>
>A recent GAS update to Debian (currently at 2.16.1cvs20050902-1)
>changed the length of this instruction:
>
> adc 0(%ebx,%ecx,4),%edx
>
>Previously, it was encoded as a four-octet sequence, now it's
>equivalent to:
>
> adc (%ebx,%ecx,4),%edx
>
>-- which only needs three octets.
>
>Is this the intended behavior?
Yes. It just makes things more consistent. You will easily recognize
that already before there was no (easy) way to force gas to use a 4-byte
displacement (you're just unable to indicate you want a 'long' zero),
and that there were instruction length adjustments (relaxation) done
elsewhere.
>Is there any easy way to force the
>long instruction encoding, short of using .byte?
Not that I know of. But I also can't see the general need for something
like that...
Jan
More information about the Binutils
mailing list