xref: /llvm-project/llvm/test/MC/ARM/comment.s (revision 81e911cd868252e2e788ae1b82fb1ac5b56fd1f6)
12cdc56d2SDavid Peixotto@ Tests to check that '@' does not get lexed as an identifier for arm
22cdc56d2SDavid Peixotto@ RUN: llvm-mc %s -triple=armv7-linux-gnueabi  | FileCheck %s
32cdc56d2SDavid Peixotto@ RUN: llvm-mc %s -triple=armv7-linux-gnueabi 2>&1 | FileCheck %s --check-prefix=ERROR
42cdc56d2SDavid Peixotto
52cdc56d2SDavid Peixottofoo:
62cdc56d2SDavid Peixotto  bl boo@plt should be ignored
72cdc56d2SDavid Peixotto  bl goo@plt
82cdc56d2SDavid Peixotto  .long bar@got to parse this as a comment
92cdc56d2SDavid Peixotto  .long baz@got
102cdc56d2SDavid Peixotto  add r0, r0@ignore this extra junk
112cdc56d2SDavid Peixotto
12c0f92a2dSDavid Peixotto@ the symver directive should allow @ in the second symbol name
13c0f92a2dSDavid Peixottodefined1:
14c0f92a2dSDavid Peixottodefined2:
15c0f92a2dSDavid Peixottodefined3:
16c0f92a2dSDavid Peixottobar:
17c0f92a2dSDavid Peixotto  .symver defined1, bar1@zed
18c0f92a2dSDavid Peixotto  .symver defined2, bar3@@zed
19c0f92a2dSDavid Peixotto  .symver defined3, bar5@@@zed
20c0f92a2dSDavid Peixotto
21c0f92a2dSDavid Peixottofar:
22c0f92a2dSDavid Peixotto  .long baz@got
23c0f92a2dSDavid Peixotto
242cdc56d2SDavid Peixotto@CHECK-LABEL: foo:
252cdc56d2SDavid Peixotto@CHECK: bl boo
262cdc56d2SDavid Peixotto@CHECK-NOT: @
272cdc56d2SDavid Peixotto@CHECK: bl goo
282cdc56d2SDavid Peixotto@CHECK-NOT: @
292cdc56d2SDavid Peixotto@CHECK: .long bar
302cdc56d2SDavid Peixotto@CHECK-NOT: @
312cdc56d2SDavid Peixotto@CHECK: .long baz
322cdc56d2SDavid Peixotto@CHECK-NOT: @
332cdc56d2SDavid Peixotto@CHECK: add r0, r0
342cdc56d2SDavid Peixotto@CHECK-NOT: @
352cdc56d2SDavid Peixotto
36c0f92a2dSDavid Peixotto@CHECK-LABEL: bar:
37*81e911cdSRafael Espindola@CHECK: .symver defined1, bar1@zed
38*81e911cdSRafael Espindola@CHECK: .symver defined2, bar3@@zed
39*81e911cdSRafael Espindola@CHECK: .symver defined3, bar5@@@zed
40c0f92a2dSDavid Peixotto
41c0f92a2dSDavid Peixotto@ Make sure we did not mess up the parser state and it still lexes
42c0f92a2dSDavid Peixotto@ comments correctly by excluding the @ in normal symbols
43c0f92a2dSDavid Peixotto@CHECK-LABEL: far:
44c0f92a2dSDavid Peixotto@CHECK:  .long baz
45c0f92a2dSDavid Peixotto@CHECK-NOT: @
46c0f92a2dSDavid Peixotto
472cdc56d2SDavid Peixotto@ERROR-NOT: error:
48