Enable 32-bit Alignment

Menezes, Evandro evandro.menezes@amd.com
Mon Jul 2 21:57:00 GMT 2007


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





More information about the Binutils mailing list