This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Preventing x86 instruction length optimizations
- From: "Jan Beulich" <JBeulich at novell dot com>
- To: "Florian Weimer" <fw at deneb dot enyo dot de>
- Cc: <binutils at sourceware dot org>
- Date: Tue, 06 Dec 2005 17:21:42 +0100
- Subject: Re: Preventing x86 instruction length optimizations
- References: <87y82ymcue.fsf@mid.deneb.enyo.de>
>>> 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