2016-11-03 00:22:51 +08:00
|
|
|
// RUN: not llvm-mc -triple armv7--none-eabi %s 2>&1 | FileCheck %s
|
|
|
|
// RUN: not llvm-mc -triple armv7--none-eabi %s 2>&1 | grep "error:" | count 33
|
|
|
|
|
|
|
|
// CHECK: [[@LINE+1]]:10: error: unexpected token
|
|
|
|
.word 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.word 0 @ EOL COMMENT
|
2016-11-03 00:22:51 +08:00
|
|
|
// CHECK: [[@LINE+1]]:11: error: unexpected token
|
|
|
|
.short 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.short 0 @ EOL COMMENT
|
2016-11-03 00:22:51 +08:00
|
|
|
// CHECK: [[@LINE+1]]:11: error: unexpected token
|
|
|
|
.hword 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.hword 0 @ EOL COMMENT
|
2016-11-03 00:22:51 +08:00
|
|
|
|
|
|
|
.arch armv7-a
|
|
|
|
// CHECK: [[@LINE+1]]:9: error: unexpected token in directive
|
|
|
|
.thumb $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.thumb @ EOL COMMENT
|
2016-11-03 00:22:51 +08:00
|
|
|
|
|
|
|
// CHECK: [[@LINE+1]]:7: error: unexpected token in directive
|
|
|
|
.arm $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.arm @ EOL COMMENT
|
2016-11-03 00:22:51 +08:00
|
|
|
// CHECK: [[@LINE+1]]:14: error: unexpected token in '.thumb_func' directive
|
|
|
|
.thumb_func $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.thumb_func @ EOL COMMENT
|
2016-11-03 00:22:51 +08:00
|
|
|
// CHECK: [[@LINE+1]]:11: error: unexpected token in directive
|
|
|
|
.code 16 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.code 16 @ EOL COMMENTS
|
2016-11-03 00:22:51 +08:00
|
|
|
// CHECK: [[@LINE+1]]:18: error: unexpected token in directive
|
|
|
|
.syntax unified $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.syntax unified @ EOL COMMENT
|
2016-11-03 00:22:51 +08:00
|
|
|
fred .req r5
|
|
|
|
// CHECK: [[@LINE+1]]:14: error: unexpected input in '.unreq' directive
|
|
|
|
.unreq fred $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.unreq fred @ EOL COMMENTS
|
2016-11-03 00:22:51 +08:00
|
|
|
|
|
|
|
// CHECK: [[@LINE+1]]:18: error: unexpected token in '.fnstart' directive
|
|
|
|
.fnstart $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.fnstart @ EOL COMMENT
|
2016-11-03 00:22:51 +08:00
|
|
|
// CHECK: [[@LINE+1]]:23: error: unexpected token in '.cantunwind' directive
|
|
|
|
.cantunwind $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.cantunwind @ EOL COMMENT
|
2016-11-03 00:22:51 +08:00
|
|
|
|
|
|
|
|
|
|
|
// CHECK: [[@LINE+1]]:18: error: unexpected token in '.fnend' directive
|
|
|
|
.fnend $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.fnend @ EOL COMMENT
|
2016-11-03 00:22:51 +08:00
|
|
|
|
|
|
|
.fnstart
|
|
|
|
// CHECK: [[@LINE+1]]:43: error: unexpected token in '.personality' directive
|
|
|
|
.personality __gxx_personality_v0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.personality __gxx_personality_v0 @ EOL COMMENET
|
2016-11-03 00:22:51 +08:00
|
|
|
|
|
|
|
// CHECK: [[@LINE+1]]:28: error: unexpected token
|
|
|
|
.setfp fp, sp, #0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.setfp fp, sp, #0 @ EOL COMMENT
|
2016-11-03 00:22:51 +08:00
|
|
|
|
|
|
|
|
|
|
|
// CHECK: [[@LINE+1]]:17: error: unexpected token in '.pad' directive
|
|
|
|
.pad #0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.pad #0 @ EOL COMMENT
|
2016-11-03 00:22:51 +08:00
|
|
|
|
|
|
|
// CHECK: [[@LINE+1]]:20: error: unexpected token in directive
|
|
|
|
.save {r0} $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.save {r0} @ EOL COMMENT
|
2016-11-03 00:22:51 +08:00
|
|
|
|
|
|
|
// CHECK: [[@LINE+1]]:21: error: unexpected token in directive
|
|
|
|
.vsave {d0} $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.vsave {d0} @ EOL COMMENT
|
2016-11-03 00:22:51 +08:00
|
|
|
|
|
|
|
|
|
|
|
// CHECK: [[@LINE+1]]:22: error: unexpected token in '.handlerdata' directive
|
|
|
|
.handlerdata $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.handlerdata @ EOL COMMENT
|
2016-11-03 00:22:51 +08:00
|
|
|
|
|
|
|
.fnend
|
|
|
|
|
|
|
|
// CHECK: [[@LINE+1]]:9: error: unexpected token in directive
|
|
|
|
.ltorg $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.ltorg @ EOL COMMENT
|
2016-11-03 00:22:51 +08:00
|
|
|
// CHECK: [[@LINE+1]]:8: error: unexpected token in directive
|
|
|
|
.pool $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.pool @ EOL COMMENT
|
2016-11-03 00:22:51 +08:00
|
|
|
// CHECK: [[@LINE+1]]:8: error: unexpected token in directive
|
|
|
|
.even $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.even @ EOL COMMENT
|
2016-11-03 00:22:51 +08:00
|
|
|
.fnstart
|
|
|
|
// CHECK: [[@LINE+1]]:22: error: unexpected token in '.personalityindex' directive
|
|
|
|
.personalityindex 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.personalityindex 0 @ EOL COMMENT
|
2016-11-03 00:22:51 +08:00
|
|
|
.fnend
|
|
|
|
|
|
|
|
.fnstart
|
|
|
|
// CHECK: [[@LINE+1]]:19: error: unexpected token
|
|
|
|
.unwind_raw 0, 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.unwind_raw 0, 0 @ EOL COMMENT
|
2016-11-03 00:22:51 +08:00
|
|
|
|
|
|
|
// CHECK: [[@LINE+1]]:12: error: unexpected token in '.movsp' directive
|
|
|
|
.movsp r0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.movsp r1 @ EOL COMMENT
|
2016-11-03 00:22:51 +08:00
|
|
|
.fnend
|
|
|
|
|
|
|
|
// CHECK: [[@LINE+1]]:21: error: unexpected token in '.arch_extension' directive
|
|
|
|
.arch_extension mp $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.arch_extension mp @ EOL COMMENT
|
2016-11-03 00:22:51 +08:00
|
|
|
|
|
|
|
// CHECK: [[@LINE+1]]:21: error: unexpected token in '.arch_extension' directive
|
|
|
|
.arch_extension mp $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.arch_extension mp @ EOL COMMENT
|
2016-11-03 00:22:51 +08:00
|
|
|
|
|
|
|
.type arm_func,%function
|
|
|
|
arm_func:
|
|
|
|
nop
|
|
|
|
// CHECK: [[@LINE+1]]:45: error: unexpected token
|
|
|
|
.thumb_set alias_arm_func, arm_func $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.thumb_set alias_arm_func, arm_func @ EOL COMMENT
|
2016-11-03 00:22:51 +08:00
|
|
|
|
|
|
|
// CHECK: [[@LINE+1]]:23: error: unexpected token in '.eabi_attribute' directive
|
|
|
|
.eabi_attribute 0, 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.eabi_attribute 0, 0 @ EOL COMMENT
|
2016-11-03 00:22:51 +08:00
|
|
|
|
|
|
|
.arm
|
|
|
|
// CHECK: [[@LINE+1]]:10: error: unexpected token
|
|
|
|
.inst 2 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.inst 2 @ EOL COMMENT
|
2016-11-03 00:22:51 +08:00
|
|
|
.thumb
|
|
|
|
// CHECK: [[@LINE+1]]:12: error: unexpected token
|
|
|
|
.inst.n 2 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.inst.n 2 @ EOL COMMENT
|
2016-11-03 00:22:51 +08:00
|
|
|
// CHECK: [[@LINE+1]]:12: error: unexpected token
|
|
|
|
.inst.w 4 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.inst.w 4 @ EOL COMMENT
|
2016-11-03 00:22:51 +08:00
|
|
|
// CHECK: [[@LINE+1]]:21: error: unexpected token
|
|
|
|
.object_arch armv7 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.object_arch armv7 @ EOL COMMENT
|
2016-11-03 00:22:51 +08:00
|
|
|
// CHECK: [[@LINE+1]]:23: error: unexpected token in '.tlsdescseq' directive
|
|
|
|
.tlsdescseq variable $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.tlsdescseq variable @ EOL COMMENT
|