2009-09-03 08:15:11 +02:00
|
|
|
// RUN: llvm-mc -triple i686-apple-darwin10 %s | FileCheck %s
|
2009-07-31 23:55:09 +02:00
|
|
|
|
2009-08-01 01:13:12 +02:00
|
|
|
.data
|
2009-07-31 23:55:09 +02:00
|
|
|
// CHECK: a:
|
|
|
|
a:
|
|
|
|
.long 0
|
|
|
|
// CHECK: b:
|
|
|
|
"b":
|
|
|
|
.long 0
|
2009-09-03 08:13:45 +02:00
|
|
|
// CHECK: a$b:
|
2009-07-31 23:55:09 +02:00
|
|
|
"a$b":
|
|
|
|
.long 0
|
|
|
|
|
2009-08-01 01:13:12 +02:00
|
|
|
.text
|
2009-10-16 03:34:54 +02:00
|
|
|
foo:
|
2009-09-03 08:13:45 +02:00
|
|
|
// CHECK: addl $24, a$b(%eax)
|
2009-10-16 03:34:54 +02:00
|
|
|
addl $24, "a$b"(%eax)
|
2009-09-08 16:14:24 +02:00
|
|
|
// CHECK: addl $24, a$b+10(%eax)
|
2009-07-31 23:55:09 +02:00
|
|
|
addl $24, ("a$b" + 10)(%eax)
|
2009-10-16 03:34:54 +02:00
|
|
|
|
2009-09-03 08:13:45 +02:00
|
|
|
// CHECK: b$c = 10
|
2009-07-31 23:55:09 +02:00
|
|
|
"b$c" = 10
|
2009-10-16 03:34:54 +02:00
|
|
|
// CHECK: addl $10, %eax
|
2010-01-30 02:02:48 +01:00
|
|
|
addl $"b$c", %eax
|
2009-10-16 03:34:54 +02:00
|
|
|
|
2009-08-31 10:09:09 +02:00
|
|
|
// CHECK: "a 0" = 11
|
2009-08-14 21:10:46 +02:00
|
|
|
.set "a 0", 11
|
2009-10-16 03:34:54 +02:00
|
|
|
|
|
|
|
// CHECK: .long 11
|
2009-08-01 02:48:30 +02:00
|
|
|
.long "a 0"
|
|
|
|
|
2009-08-09 01:39:42 +02:00
|
|
|
// XXCHCK: .section "a 1,a 2"
|
|
|
|
//.section "a 1", "a 2"
|
2009-08-01 02:48:30 +02:00
|
|
|
|
|
|
|
// CHECK: .globl "a 3"
|
|
|
|
.globl "a 3"
|
|
|
|
|
|
|
|
// CHECK: .weak "a 4"
|
|
|
|
.weak "a 4"
|
|
|
|
|
|
|
|
// CHECK: .desc "a 5",1
|
|
|
|
.desc "a 5", 1
|
|
|
|
|
|
|
|
// CHECK: .comm "a 6",1
|
|
|
|
.comm "a 6", 1
|
|
|
|
|
2009-08-31 10:09:09 +02:00
|
|
|
// CHECK: .zerofill __DATA,__bss,"a 7",1,0
|
2009-08-01 02:48:30 +02:00
|
|
|
.lcomm "a 7", 1
|
|
|
|
|
2009-08-30 09:01:09 +02:00
|
|
|
// FIXME: We don't bother to support .lsym.
|
2009-10-16 03:34:54 +02:00
|
|
|
|
2009-08-30 09:01:09 +02:00
|
|
|
// CHECX: .lsym "a 8",1
|
|
|
|
// .lsym "a 8", 1
|
2009-08-14 21:10:46 +02:00
|
|
|
|
2009-09-08 16:14:24 +02:00
|
|
|
// CHECK: "a 9" = a-b
|
2009-08-14 21:10:46 +02:00
|
|
|
.set "a 9", a - b
|
2009-10-16 03:34:54 +02:00
|
|
|
|
2009-08-14 21:10:46 +02:00
|
|
|
// CHECK: .long "a 9"
|
|
|
|
.long "a 9"
|