diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2013-02-16 15:00:16 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2013-02-16 15:00:16 +0000 |
commit | 8a89cf233dcb3359c8649febefb4c38246f2acb4 (patch) | |
tree | 3863b01e39f7f89d0ab85942a4464ff48ddb4aeb /test/MC/AsmParser | |
parent | 30fcfc39e2abdb7765c282e8c9d4c63c3d4f83b1 (diff) | |
download | external_llvm-8a89cf233dcb3359c8649febefb4c38246f2acb4.zip external_llvm-8a89cf233dcb3359c8649febefb4c38246f2acb4.tar.gz external_llvm-8a89cf233dcb3359c8649febefb4c38246f2acb4.tar.bz2 |
MCParser: Reject .balign with non-pow2 alignments.
GNU as rejects them and there are configure scripts in the wild that check if
the assembler rejects ".align 3" to determine whether the alignment is in bytes
or powers of two.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175360 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/AsmParser')
-rw-r--r-- | test/MC/AsmParser/align_invalid.s | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/MC/AsmParser/align_invalid.s b/test/MC/AsmParser/align_invalid.s new file mode 100644 index 0000000..0d06d94 --- /dev/null +++ b/test/MC/AsmParser/align_invalid.s @@ -0,0 +1,10 @@ +# RUN: llvm-mc -triple i386-linux-gnu < %s 2>&1 | FileCheck %s -check-prefix=ELF +# RUN: llvm-mc -triple i386-apple-darwin < %s 2>&1 | FileCheck %s -check-prefix=DARWIN + +.align 3 +# ELF: error: alignment must be a power of 2 +# DARWIN-NOT: error + +.align 32 +# ELF-NOT: error +# DARWIN: error: invalid alignment value |