From 64bf78046ea4f65b9f7a9c8bb23e94d7ff5829cc Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sat, 16 Feb 2013 15:00:16 +0000 Subject: 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. llvm-svn: 175360 --- llvm/test/MC/AsmParser/align_invalid.s | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 llvm/test/MC/AsmParser/align_invalid.s (limited to 'llvm/test') diff --git a/llvm/test/MC/AsmParser/align_invalid.s b/llvm/test/MC/AsmParser/align_invalid.s new file mode 100644 index 00000000000..0d06d9423ce --- /dev/null +++ b/llvm/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 -- cgit v1.2.3