1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
llvm-mirror/test/MC/AsmParser/labels.s
Daniel Dunbar dc5840c57c Update llvm-mc / MCAsmStreamer to print the instruction using the actual target
specific printer (this only works on x86, for now).
 - This makes it possible to do some correctness checking of the parsing and
   matching, since we can compare the results of 'as' on the original input, to
   those of 'as' on the output from llvm-mc.

 - In theory, we could now have an easy ATT -> Intel syntax converter. :)

llvm-svn: 78986
2009-08-14 03:48:55 +00:00

52 lines
872 B
ArmAsm

// RUN: llvm-mc -triple i386-unknown-unknown %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: set "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: .weak "a 4"
.weak "a 4"
// CHECK: .desc "a 5",1
.desc "a 5", 1
// CHECK: .comm "a 6",1
.comm "a 6", 1
// CHECK: .lcomm "a 7",1
.lcomm "a 7", 1
// CHECK: .lsym "a 8",1
.lsym "a 8", 1