mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-26 23:29:22 +00:00
The .local, .hidden, .internal, and .protected are not legal for all supported file formats (in particular, they're invalid for MachO). Move the parsing for them into the ELF assembly parser since that's the format they're for. Similarly, .weak is used by COFF and ELF, but not MachO, so move the parsing to the COFF and ELF asm parsers. Previously, using any of these directives on Darwin would result in an assertion failure in the parser; now we get a diagnostic as we should. rdar://9827089 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135921 91177308-0d34-0410-b5e6-96231b3b80d8
57 lines
949 B
ArmAsm
57 lines
949 B
ArmAsm
// RUN: llvm-mc -triple i686-apple-darwin10 %s | FileCheck %s
|
|
|
|
.data
|
|
// CHECK: a:
|
|
a:
|
|
.long 0
|
|
// CHECK: b:
|
|
"b":
|
|
.long 0
|
|
// CHECK: a$b:
|
|
"a$b":
|
|
.long 0
|
|
|
|
.text
|
|
foo:
|
|
// CHECK: addl $24, a$b(%eax)
|
|
addl $24, "a$b"(%eax)
|
|
// CHECK: addl $24, a$b+10(%eax)
|
|
addl $24, ("a$b" + 10)(%eax)
|
|
|
|
// CHECK: b$c = 10
|
|
"b$c" = 10
|
|
// CHECK: addl $10, %eax
|
|
addl $"b$c", %eax
|
|
|
|
// CHECK: "a 0" = 11
|
|
.set "a 0", 11
|
|
|
|
// CHECK: .long 11
|
|
.long "a 0"
|
|
|
|
// XXCHCK: .section "a 1,a 2"
|
|
//.section "a 1", "a 2"
|
|
|
|
// CHECK: .globl "a 3"
|
|
.globl "a 3"
|
|
|
|
// CHECK: .desc "a 5",1
|
|
.desc "a 5", 1
|
|
|
|
// CHECK: .comm "a 6",1
|
|
.comm "a 6", 1
|
|
|
|
// CHECK: .zerofill __DATA,__bss,"a 7",1,0
|
|
.lcomm "a 7", 1
|
|
|
|
// FIXME: We don't bother to support .lsym.
|
|
|
|
// CHECX: .lsym "a 8",1
|
|
// .lsym "a 8", 1
|
|
|
|
// CHECK: "a 9" = a-b
|
|
.set "a 9", a - b
|
|
|
|
// CHECK: .long "a 9"
|
|
.long "a 9"
|