[llvm] r176490 - Add a test that .align directives on capable processors use long NOPs.

David Sehr sehr at google.com
Tue Mar 5 09:57:51 PST 2013


Apologies for forgetting that fact.  I'll change to .p2align 5 if there are
no objections.


On Tue, Mar 5, 2013 at 9:56 AM, Benjamin Kramer <benny.kra at gmail.com> wrote:

>
> On 05.03.2013, at 18:49, Chad Rosier <mcrosier at apple.com> wrote:
>
> > David,
> > This is failing for me locally with the following error:
> >
> > /Users/mcrosier/llvm-clean/llvm/test/MC/X86/x86_long_nop.s:6:8: error:
> invalid alignment value
> > .align 32
> >
> > Does the .align directive expect log base 2 of the byte alignment (i.e.,
> .align 5)?
>
> Depends on the platform, it's log2 on darwin and byte alignment on most
> ELF platforms.
>
> .p2align and .balign are portable alternatives.
>
> - Ben
>
> >  Chad
> >
> > On Mar 5, 2013, at 8:46 AM, David Sehr <sehr at google.com> wrote:
> >
> >> Author: sehr
> >> Date: Tue Mar  5 10:46:54 2013
> >> New Revision: 176490
> >>
> >> URL: http://llvm.org/viewvc/llvm-project?rev=176490&view=rev
> >> Log:
> >> Add a test that .align directives on capable processors use long NOPs.
> >>
> >> Added:
> >>    llvm/trunk/test/MC/X86/x86_long_nop.s
> >>
> >> Added: llvm/trunk/test/MC/X86/x86_long_nop.s
> >> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/X86/x86_long_nop.s?rev=176490&view=auto
> >>
> ==============================================================================
> >> --- llvm/trunk/test/MC/X86/x86_long_nop.s (added)
> >> +++ llvm/trunk/test/MC/X86/x86_long_nop.s Tue Mar  5 10:46:54 2013
> >> @@ -0,0 +1,12 @@
> >> +# RUN: llvm-mc -filetype=obj -arch=x86 -mcpu=i686 %s | llvm-objdump -d
> -no-show-raw-insn - | FileCheck %s
> >> +
> >> +# Ensure alignment directives also emit sequences of 15-byte NOPs on
> processors
> >> +# capable of using long NOPs.
> >> +inc %eax
> >> +.align 32
> >> +inc %eax
> >> +# CHECK: 0:  inc
> >> +# CHECK-NEXT: 1:  nop
> >> +# CHECK-NEXT: 10:  nop
> >> +# CHECK-NEXT: 1f:  nop
> >> +# CHECK-NEXT: 20:  inc
> >>
> >>
> >> _______________________________________________
> >> llvm-commits mailing list
> >> llvm-commits at cs.uiuc.edu
> >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130305/223aaf15/attachment.html>


More information about the llvm-commits mailing list