This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RE: Enable 32-bit Alignment
- From: "Menezes, Evandro" <evandro dot menezes at amd dot com>
- To: "Alan Modra" <amodra at bigpond dot net dot au>
- Cc: binutils at sourceware dot org, "Meissner, Michael" <michael dot meissner at amd dot com>, "Harle, Christophe" <christophe dot harle at amd dot com>
- Date: Mon, 2 Jul 2007 14:22:22 -0500
- Subject: RE: Enable 32-bit Alignment
- References: <1E52B51E700FAF42ADA0B9432F7CCCD24907E7@SAUSEXMB1.amd.com> <20070630034742.GC497@bubble.grove.modra.org>
Alan,
> In the current i386_align_code, see comment "Adjust jump
> offset" in block handling 16-bit mode. Now that larger nop
> sequences are allowed, I think you should similarly adjust a
> branch (if used) in 32-bit mode.
Indeed.
> Also, your code sequence
> for 31 byte nop padding will not be very good. You'll get
> two 15 byte nops and a single nop.
> Please rethink the way you have implemented this.
I believe that most x86 processors find no problem with that. The lengths of the NOPs don't have to be neatly balanced. What matters is to keep the number of NOPs down and given that the maximum x86 instruction length has been limited to 15 bytes in the last 10 years or so, padding with 31 bytes will always require at least 3 NOPs.
Or do you have something else in mind?
Thanks,
_______________________________________________________
Evandro Menezes Solutions Enablement Engineering
512-602-9940 Advanced Micro Devices
evandro.menezes@amd.com Austin, TX