70 lines · plain
1# Error checking for malformed directives2# RUN: not llvm-mc -triple mips-unknown-unknown %s 2>&1 | FileCheck %s3 4 .abicalls should have no operands5# CHECK: :{{[0-9]+}}:{{[0-9]+}}: error: unexpected token, expected end of statement6# CHECK-NEXT: .abicalls should have no operands7# CHECK-NEXT: ^8 9# We don't know yet how to represent a list of options10# pic2 will eventually be legal so we will probably want11# to change it to something silly.12 13# Blank option operand14 .option 15# CHECK-NEXT: :{{[0-9]+}}:{{[0-9]+}}: error: unexpected token, expected identifier16# CHECK-NEXT: .option 17# CHECK-NEXT: ^18 19# Numeric option operand20 .option 221# CHECK-NEXT: :{{[0-9]+}}:{{[0-9]+}}: error: unexpected token, expected identifier22# CHECK-NEXT: .option 223# CHECK-NEXT: ^24 25# Register option operand26 .option $227# CHECK-NEXT: :{{[0-9]+}}:{{[0-9]+}}: error: unexpected token, expected identifier28# CHECK-NEXT: .option $229# CHECK-NEXT: ^30 31 .option WithBadOption32# CHECK-NEXT: :{{[0-9]+}}:{{[0-9]+}}: warning: unknown option, expected 'pic0' or 'pic2'33# CHECK-NEXT: .option WithBadOption34# CHECK-NEXT: ^35 36 .option pic0,37# CHECK-NEXT: :{{[0-9]+}}:{{[0-9]+}}: error: unexpected token, expected end of statement38# CHECK-NEXT: .option pic0,39# CHECK-NEXT: ^40 41 .option pic0,pic242# CHECK-NEXT: :{{[0-9]+}}:{{[0-9]+}}: error: unexpected token, expected end of statement43# CHECK-NEXT: .option pic0,pic244# CHECK-NEXT: ^45 46 .option pic0 pic247# CHECK-NEXT: :{{[0-9]+}}:{{[0-9]+}}: error: unexpected token, expected end of statement48# CHECK-NEXT: .option pic0 pic249# CHECK-NEXT: ^50 51 .option pic2,52# CHECK-NEXT: :{{[0-9]+}}:{{[0-9]+}}: error: unexpected token, expected end of statement53# CHECK-NEXT: .option pic2,54# CHECK-NEXT: ^55 56 .option pic2 pic357# CHECK-NEXT: :{{[0-9]+}}:{{[0-9]+}}: error: unexpected token, expected end of statement58# CHECK-NEXT: .option pic2 pic359# CHECK-NEXT: ^60 61 .set 123, $a062# CHECK-NEXT: :{{[0-9]+}}:{{[0-9]+}}: error: expected identifier after .set63# CHECK-NEXT: .set 12364# CHECK-NEXT: ^65 66 .set reg.67# CHECK-NEXT: :{{[0-9]+}}:{{[0-9]+}}: error: unexpected token, expected comma68# CHECK-NEXT: .set reg.69# CHECK-NEXT: ^70