summaryrefslogtreecommitdiff
path: root/test/MC/AsmParser/directive_lcomm.s
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-09-07 17:25:13 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-09-07 17:25:13 +0000
commit39646d96e76aea5d20bffb386233a0dbb5932a21 (patch)
tree5de73a0fc45310a16dab5a01751ba4302b33a75a /test/MC/AsmParser/directive_lcomm.s
parent8e70b5506ec0d7a6c2740bc89cd1b8f12a78b24f (diff)
downloadllvm-39646d96e76aea5d20bffb386233a0dbb5932a21.tar.gz
llvm-39646d96e76aea5d20bffb386233a0dbb5932a21.tar.bz2
llvm-39646d96e76aea5d20bffb386233a0dbb5932a21.tar.xz
MC: Overhaul handling of .lcomm
- Darwin lied about not supporting .lcomm and turned it into zerofill in the asm parser. Push the zerofill-conversion down into macho-specific code. - This makes the tri-state LCOMMType enum superfluous, there are no targets without .lcomm. - Do proper error reporting when trying to use .lcomm with alignment on a target that doesn't support it. - .comm and .lcomm alignment was parsed in bytes on COFF, should be power of 2. - Fixes PR13755 (.lcomm crashes on ELF). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163395 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/AsmParser/directive_lcomm.s')
-rw-r--r--test/MC/AsmParser/directive_lcomm.s11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/MC/AsmParser/directive_lcomm.s b/test/MC/AsmParser/directive_lcomm.s
index 0a0add513f..37a350c82e 100644
--- a/test/MC/AsmParser/directive_lcomm.s
+++ b/test/MC/AsmParser/directive_lcomm.s
@@ -1,9 +1,14 @@
# RUN: llvm-mc -triple i386-apple-darwin10 %s | FileCheck %s
+# RUN: llvm-mc -triple i386-pc-mingw32 %s | FileCheck %s
+# RUN: not llvm-mc -triple i386-linux-gnu %s 2>&1 | FileCheck %s -check-prefix=ERROR
# CHECK: TEST0:
-# CHECK: .zerofill __DATA,__bss,a,7,4
-# CHECK: .zerofill __DATA,__bss,b,8
-# CHECK: .zerofill __DATA,__bss,c,0
+# CHECK: .lcomm a,7,4
+# CHECK: .lcomm b,8
+# CHECK: .lcomm c,0
+
+# ELF doesn't like alignment on .lcomm.
+# ERROR: alignment not supported on this target
TEST0:
.lcomm a, 8-1, 4
.lcomm b,8