2017-08-21 17:58:37 +08:00
|
|
|
// RUN: not llvm-mc -triple aarch64-none-eabi %s 2>&1 | FileCheck %s
|
|
|
|
// RUN: not llvm-mc -triple aarch64-none-eabi %s 2>&1 | grep "error:" | count 60
|
2016-10-24 22:35:29 +08:00
|
|
|
|
|
|
|
// CHECK: [[@LINE+1]]:19: error: unexpected token in '.equ' directive
|
|
|
|
.equ ident1, 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.equ ident1, 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:19: error: unexpected token in '.equiv' directive
|
|
|
|
.equiv ident2, 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.equiv ident2, 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:19: error: unexpected token in '.set' directive
|
|
|
|
.set ident3, 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.set ident3, 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:20: error: unexpected token in '.ascii' directive
|
|
|
|
.ascii "string1" $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.ascii "string1" // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:20: error: unexpected token in '.asciz' directive
|
|
|
|
.asciz "string2" $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.asciz "string2" // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:20: error: unexpected token in '.string' directive
|
|
|
|
.string "string3" $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.string "string3" // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:10: error: unexpected token in '.byte' directive
|
|
|
|
.byte 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.byte 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:10: error: unexpected token in '.dc.b' directive
|
|
|
|
.dc.b 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.dc.b 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:8: error: unexpected token in '.dc' directive
|
|
|
|
.dc 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.dc.b 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:10: error: unexpected token in '.dc.w' directive
|
|
|
|
.dc.w 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.dc.w 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:11: error: unexpected token in '.short' directive
|
|
|
|
.short 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.short 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:11: error: unexpected token in '.value' directive
|
|
|
|
.value 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.value 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:11: error: unexpected token in '.2byte' directive
|
|
|
|
.2byte 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.2byte 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:10: error: unexpected token in '.long' directive
|
|
|
|
.long 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.long 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:10: error: unexpected token in '.int' directive
|
|
|
|
.int 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.int 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:11: error: unexpected token in '.4byte' directive
|
|
|
|
.4byte 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.4byte 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:10: error: unexpected token in '.dc.l' directive
|
|
|
|
.dc.l 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.dc.l 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:10: error: unexpected token in '.quad' directive
|
|
|
|
.quad 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.quad 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:11: error: unexpected token in '.8byte' directive
|
|
|
|
.8byte 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.8byte 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:10: error: unexpected token in '.dc.a' directive
|
|
|
|
.dc.a 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.dc.a 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:10: error: unexpected token in '.octa' directive
|
|
|
|
.octa 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.octa 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:12: error: unexpected token in '.single' directive
|
|
|
|
.single 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.single 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:11: error: unexpected token in '.float' directive
|
|
|
|
.float 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.float 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:10: error: unexpected token in '.dc.s' directive
|
|
|
|
.dc.s 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.dc.s 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:12: error: unexpected token in '.double' directive
|
|
|
|
.double 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.double 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:10: error: unexpected token in '.dc.d' directive
|
|
|
|
.dc.d 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.dc.d 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:13: error: unexpected token in '.fill' directive
|
|
|
|
.fill 1, 1 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.fill 1, 1 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:17: error: unexpected token in '.fill' directive
|
|
|
|
.fill 1, 1, 10 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.fill 1, 1, 10 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:16: error: unexpected token in '.org' directive
|
|
|
|
.org 1 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.org 1 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:11: error: unexpected token in directive
|
|
|
|
.align 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.align 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:13: error: unexpected token in directive
|
|
|
|
.align32 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.align32 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:12: error: unexpected token in directive
|
|
|
|
.balign 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.balign 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:13: error: unexpected token in directive
|
|
|
|
.balignw 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.balignw 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:13: error: unexpected token in directive
|
|
|
|
.balignl 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.balignl 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:13: error: unexpected token in directive
|
|
|
|
.p2align 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.p2align 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:14: error: unexpected token in directive
|
|
|
|
.p2alignw 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.p2alignw 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:14: error: unexpected token in directive
|
|
|
|
.p2alignl 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.p2alignl 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:8: error: unexpected token in '.line' directive
|
|
|
|
.line $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.line // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:10: error: unexpected token in '.line' directive
|
|
|
|
.line 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.line 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
|
|
|
|
.file 1 "hello"
|
|
|
|
// CHECK: [[@LINE+1]]:16: error: unexpected token in '.loc' directive
|
|
|
|
.loc 1 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.loc 1 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
|
|
|
|
// CHECK: [[@LINE+1]]:21: error: unexpected token in '.cv_file' directive
|
|
|
|
.cv_file 1 "hello" $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.cv_file 1 "hello" // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
|
|
|
|
.cv_func_id 1
|
|
|
|
// CHECK: [[@LINE+1]]:14: error: unexpected token in '.cv_loc' directive
|
|
|
|
.cv_loc 1 1 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.cv_loc 1 1 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
|
|
|
|
// CHECK: [[@LINE+1]]:28: error: unexpected token after '.bundle_lock' directive option
|
|
|
|
.bundle_lock align_to_end $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.bundle_lock align_to_end // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
|
|
|
|
// CHECK: [[@LINE+1]]:11: error: invalid token in expression in directive
|
|
|
|
.sleb128 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.sleb128 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:13: error: unexpected token in directive
|
|
|
|
.sleb128 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.sleb128 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
|
|
|
|
// CHECK: [[@LINE+1]]:11: error: invalid token in expression in directive
|
|
|
|
.uleb128 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.uleb128 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:13: error: unexpected token in directive
|
|
|
|
.uleb128 0 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.uleb128 0 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:31: error: unexpected token
|
|
|
|
.globl a1 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.globl a1 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:31: error: unexpected token in directive
|
|
|
|
.global a2 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.global a2 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:31: error: unexpected token in directive
|
|
|
|
.lazy_reference a3 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.lazy_reference a3 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:31: error: unexpected token in directive
|
|
|
|
.symbol_resolver a4 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.symbol_resolver a4 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:31: error: unexpected token in directive
|
|
|
|
.private_extern a5 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.private_extern a5 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:31: error: unexpected token in directive
|
|
|
|
.reference a6 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.reference a6 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:31: error: unexpected token in directive
|
|
|
|
.weak_definition a7 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.weak_definition a7 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:31: error: unexpected token in directive
|
|
|
|
.weak_reference a8 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.weak_reference a8 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:31: error: unexpected token in directive
|
|
|
|
.weak_def_can_be_hidden a9 $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.weak_def_can_be_hidden a9 // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:12: error: .warning argument must be a string
|
|
|
|
.warning $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.warning // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
// CHECK: [[@LINE+1]]:21: error: expected end of statement in '.warning' directive
|
|
|
|
.warning "warning" $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.warning "warning" // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
|
|
|
|
|
|
|
|
// CHECK: [[@LINE+1]]:17: error: unexpected token in '.cfi_startproc' directive
|
|
|
|
.cfi_startproc $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.cfi_startproc // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
.cfi_endproc
|
|
|
|
// CHECK: [[@LINE+1]]:24: error: unexpected token in '.cfi_startproc' directive
|
|
|
|
.cfi_startproc simple $
|
|
|
|
// CHECK-NOT: [[@LINE+1]]:{{[0-9]+}}: error:
|
2017-08-21 17:58:37 +08:00
|
|
|
.cfi_startproc simple // EOL COMMENT
|
2016-10-24 22:35:29 +08:00
|
|
|
.cfi_endproc
|
|
|
|
|
|
|
|
|
|
|
|
// CHECK-NOT: error:
|