1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/test/MC/AsmParser/directive_lcomm.s
Benjamin Kramer f7fdee3ce3 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).

llvm-svn: 163395
2012-09-07 17:25:13 +00:00

16 lines
446 B
ArmAsm

# 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: .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
.lcomm c, 0