This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Enable 32-bit Alignment
- From: "H.J. Lu" <hjl at lucon dot org>
- To: "Menezes, Evandro" <evandro dot menezes at amd dot com>
- Cc: binutils at sourceware dot org, Michael Meissner <michael dot meissner at sbosexmb1 dot amd dot com>, Christophe Harle <christophe dot harle at txexmtae dot amd dot com>, Dwarak Rajagopal <dwarak dot rajagopal at txexmtae dot amd dot com>
- Date: Tue, 3 Jul 2007 18:02:31 -0700
- Subject: Re: Enable 32-bit Alignment
- References: <1E52B51E700FAF42ADA0B9432F7CCCD2490910@SAUSEXMB1.amd.com>
On Tue, Jul 03, 2007 at 07:12:55PM -0500, Menezes, Evandro wrote:
> After iterating with HJ and Alan, here's another spin of the patch.
>
> 2007-06-29 Evandro Menezes <evandro.menezes@amd.com>
>
> * config/tc-i386.c (handle_align_code, i386_align_code): new
> function
> to help alignment > 15 bytes, enable alignment up to 31 bytes,
>
> always use variable-length NOP for K8 too.
> * config/tc-i386.h (MAX_MEM_FOR_RS_ALIGN_CODE): change limit to
> 31 bytes.
> * testsuite/gas/i386/i386.exp: replace NOP test-case, add new
> one and
> remove K8-specific one.
> * testsuite/gas/i386/nops-3-i686.d: new NOP test-case.
> * testsuite/gas/i386/nops-4.s: idem
> * testsuite/gas/i386/nops-4-i686.d: idem
> * testsuite/gas/i386/x86-64-nops-1-k8.d: removed.
Can you add nops-4.d and x86-64-nops-4.d?
I'd like to see some further changes:
1. For N byte alignment padding up to 15 bytes:
a. On 32bit,
i. Use (N - 1) 66 prefixes + 90 by default.
ii. When Pentium Pro or newer is specified, use (N - X) 66
prefixes + new nop insn with X bytes.
iii. For Pentum or older, use the old padding.
b. On 64bit, use (N - X) 66 prefixes + new nop insn with X bytes.
2. For alignment padding between 16 and 30 bytes, use 2 x (< 15byte nops).
3. For 31 byte alignment padding, use 2 x (15byte nops) + 1byte nop.
Will it be a problem on AMD?
Thanks.
H.J.