• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Error checking for malformed directives
2# RUN: not llvm-mc -triple mips-unknown-unknown %s 2>&1 | FileCheck %s
3
4    .abicalls should have no operands
5# CHECK:    :{{[0-9]+}}:{{[0-9]+}}: error: unexpected token, expected end of statement
6# CHECK-NEXT:    .abicalls should have no operands
7# CHECK-NEXT:              ^
8
9# We don't know yet how to represent a list of options
10# pic2 will eventually be legal so we will probably want
11# to change it to something silly.
12
13# Blank option operand
14    .option
15# CHECK-NEXT:    :{{[0-9]+}}:{{[0-9]+}}: error: unexpected token, expected identifier
16# CHECK-NEXT:    .option
17# CHECK-NEXT:            ^
18
19# Numeric option operand
20    .option 2
21# CHECK-NEXT:    :{{[0-9]+}}:{{[0-9]+}}: error: unexpected token, expected identifier
22# CHECK-NEXT:    .option 2
23# CHECK-NEXT:            ^
24
25# Register option operand
26    .option $2
27# CHECK-NEXT:    :{{[0-9]+}}:{{[0-9]+}}: error: unexpected token, expected identifier
28# CHECK-NEXT:    .option $2
29# CHECK-NEXT:            ^
30
31    .option WithBadOption
32# CHECK-NEXT:    :{{[0-9]+}}:{{[0-9]+}}: warning: unknown option, expected 'pic0' or 'pic2'
33# CHECK-NEXT:    .option WithBadOption
34# CHECK-NEXT:            ^
35
36    .option pic0,
37# CHECK-NEXT:    :{{[0-9]+}}:{{[0-9]+}}: error: unexpected token, expected end of statement
38# CHECK-NEXT:    .option pic0,
39# CHECK-NEXT:                ^
40
41    .option pic0,pic2
42# CHECK-NEXT:    :{{[0-9]+}}:{{[0-9]+}}: error: unexpected token, expected end of statement
43# CHECK-NEXT:    .option pic0,pic2
44# CHECK-NEXT:                ^
45
46    .option pic0 pic2
47# CHECK-NEXT:    :{{[0-9]+}}:{{[0-9]+}}: error: unexpected token, expected end of statement
48# CHECK-NEXT:    .option pic0 pic2
49# CHECK-NEXT:                 ^
50
51    .option pic2,
52# CHECK-NEXT:    :{{[0-9]+}}:{{[0-9]+}}: error: unexpected token, expected end of statement
53# CHECK-NEXT:    .option pic2,
54# CHECK-NEXT:                ^
55
56    .option pic2 pic3
57# CHECK-NEXT:    :{{[0-9]+}}:{{[0-9]+}}: error: unexpected token, expected end of statement
58# CHECK-NEXT:    .option pic2 pic3
59# CHECK-NEXT:                 ^
60