rva-aliases-invalid.s
8.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# RUN: not llvm-mc %s -triple=riscv32 2>&1 | FileCheck %s
# RUN: not llvm-mc %s -triple=riscv64 2>&1 | FileCheck %s
# The below tests for lr(.w), sc(.w) and amo*(.w), using `0(reg)` are actually
# implemented using a custom parser. These tests ensure the custom parser gives
# good error messages.
lr.w a1, a0 # CHECK: :[[@LINE]]:10: error: expected '(' or optional integer offset
lr.w a1, foo # CHECK: :[[@LINE]]:10: error: expected '(' or optional integer offset
lr.w a1, 1(a0) # CHECK: :[[@LINE]]:10: error: optional integer offset must be 0
lr.w a1, (foo) # CHECK: :[[@LINE]]:11: error: expected register
lr.w a1, 0(foo) # CHECK: :[[@LINE]]:12: error: expected register
lr.w a1, (f0) # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
lr.w a1, 0(f0) # CHECK: :[[@LINE]]:12: error: invalid operand for instruction
lr.w a1, 0(a0 # CHECK: :[[@LINE]]:17: error: expected ')'
lr.w a1, (a0 # CHECK: :[[@LINE]]:17: error: expected ')'
sc.w a2, a1, a0 # CHECK: :[[@LINE]]:14: error: expected '(' or optional integer offset
sc.w a2, a1, foo # CHECK: :[[@LINE]]:14: error: expected '(' or optional integer offset
sc.w a2, a1, 1(a0) # CHECK: :[[@LINE]]:14: error: optional integer offset must be 0
sc.w a2, a1, (foo) # CHECK: :[[@LINE]]:15: error: expected register
sc.w a2, a1, 0(foo) # CHECK: :[[@LINE]]:16: error: expected register
sc.w a2, a1, (f0) # CHECK: :[[@LINE]]:15: error: invalid operand for instruction
sc.w a2, a1, 0(f0) # CHECK: :[[@LINE]]:16: error: invalid operand for instruction
sc.w a2, a1, 0(a0 # CHECK: :[[@LINE]]:21: error: expected ')'
sc.w a2, a1, (a0 # CHECK: :[[@LINE]]:21: error: expected ')'
amoswap.w a2, a1, a0 # CHECK: :[[@LINE]]:19: error: expected '(' or optional integer offset
amoswap.w a2, a1, foo # CHECK: :[[@LINE]]:19: error: expected '(' or optional integer offset
amoswap.w a2, a1, 1(a0) # CHECK: :[[@LINE]]:19: error: optional integer offset must be 0
amoswap.w a2, a1, (foo) # CHECK: :[[@LINE]]:20: error: expected register
amoswap.w a2, a1, 0(foo) # CHECK: :[[@LINE]]:21: error: expected register
amoswap.w a2, a1, (f0) # CHECK: :[[@LINE]]:20: error: invalid operand for instruction
amoswap.w a2, a1, 0(f0) # CHECK: :[[@LINE]]:21: error: invalid operand for instruction
amoswap.w a2, a1, 0(a0 # CHECK: :[[@LINE]]:26: error: expected ')'
amoswap.w a2, a1, (a0 # CHECK: :[[@LINE]]:26: error: expected ')'
amoadd.w a2, a1, a0 # CHECK: :[[@LINE]]:18: error: expected '(' or optional integer offset
amoadd.w a2, a1, foo # CHECK: :[[@LINE]]:18: error: expected '(' or optional integer offset
amoadd.w a2, a1, 1(a0) # CHECK: :[[@LINE]]:18: error: optional integer offset must be 0
amoadd.w a2, a1, (foo) # CHECK: :[[@LINE]]:19: error: expected register
amoadd.w a2, a1, 0(foo) # CHECK: :[[@LINE]]:20: error: expected register
amoadd.w a2, a1, (f0) # CHECK: :[[@LINE]]:19: error: invalid operand for instruction
amoadd.w a2, a1, 0(f0) # CHECK: :[[@LINE]]:20: error: invalid operand for instruction
amoadd.w a2, a1, 0(a0 # CHECK: :[[@LINE]]:25: error: expected ')'
amoadd.w a2, a1, (a0 # CHECK: :[[@LINE]]:25: error: expected ')'
amoxor.w a2, a1, a0 # CHECK: :[[@LINE]]:18: error: expected '(' or optional integer offset
amoxor.w a2, a1, foo # CHECK: :[[@LINE]]:18: error: expected '(' or optional integer offset
amoxor.w a2, a1, 1(a0) # CHECK: :[[@LINE]]:18: error: optional integer offset must be 0
amoxor.w a2, a1, (foo) # CHECK: :[[@LINE]]:19: error: expected register
amoxor.w a2, a1, 0(foo) # CHECK: :[[@LINE]]:20: error: expected register
amoxor.w a2, a1, (f0) # CHECK: :[[@LINE]]:19: error: invalid operand for instruction
amoxor.w a2, a1, 0(f0) # CHECK: :[[@LINE]]:20: error: invalid operand for instruction
amoxor.w a2, a1, 0(a0 # CHECK: :[[@LINE]]:25: error: expected ')'
amoxor.w a2, a1, (a0 # CHECK: :[[@LINE]]:25: error: expected ')'
amoand.w a2, a1, a0 # CHECK: :[[@LINE]]:18: error: expected '(' or optional integer offset
amoand.w a2, a1, foo # CHECK: :[[@LINE]]:18: error: expected '(' or optional integer offset
amoand.w a2, a1, 1(a0) # CHECK: :[[@LINE]]:18: error: optional integer offset must be 0
amoand.w a2, a1, (foo) # CHECK: :[[@LINE]]:19: error: expected register
amoand.w a2, a1, 0(foo) # CHECK: :[[@LINE]]:20: error: expected register
amoand.w a2, a1, (f0) # CHECK: :[[@LINE]]:19: error: invalid operand for instruction
amoand.w a2, a1, 0(f0) # CHECK: :[[@LINE]]:20: error: invalid operand for instruction
amoand.w a2, a1, 0(a0 # CHECK: :[[@LINE]]:25: error: expected ')'
amoand.w a2, a1, (a0 # CHECK: :[[@LINE]]:25: error: expected ')'
amoor.w a2, a1, a0 # CHECK: :[[@LINE]]:17: error: expected '(' or optional integer offset
amoor.w a2, a1, foo # CHECK: :[[@LINE]]:17: error: expected '(' or optional integer offset
amoor.w a2, a1, 1(a0) # CHECK: :[[@LINE]]:17: error: optional integer offset must be 0
amoor.w a2, a1, (foo) # CHECK: :[[@LINE]]:18: error: expected register
amoor.w a2, a1, 0(foo) # CHECK: :[[@LINE]]:19: error: expected register
amoor.w a2, a1, (f0) # CHECK: :[[@LINE]]:18: error: invalid operand for instruction
amoor.w a2, a1, 0(f0) # CHECK: :[[@LINE]]:19: error: invalid operand for instruction
amoor.w a2, a1, 0(a0 # CHECK: :[[@LINE]]:24: error: expected ')'
amoor.w a2, a1, (a0 # CHECK: :[[@LINE]]:24: error: expected ')'
amomin.w a2, a1, a0 # CHECK: :[[@LINE]]:18: error: expected '(' or optional integer offset
amomin.w a2, a1, foo # CHECK: :[[@LINE]]:18: error: expected '(' or optional integer offset
amomin.w a2, a1, 1(a0) # CHECK: :[[@LINE]]:18: error: optional integer offset must be 0
amomin.w a2, a1, (foo) # CHECK: :[[@LINE]]:19: error: expected register
amomin.w a2, a1, 0(foo) # CHECK: :[[@LINE]]:20: error: expected register
amomin.w a2, a1, (f0) # CHECK: :[[@LINE]]:19: error: invalid operand for instruction
amomin.w a2, a1, 0(f0) # CHECK: :[[@LINE]]:20: error: invalid operand for instruction
amomin.w a2, a1, 0(a0 # CHECK: :[[@LINE]]:25: error: expected ')'
amomin.w a2, a1, (a0 # CHECK: :[[@LINE]]:25: error: expected ')'
amomax.w a2, a1, a0 # CHECK: :[[@LINE]]:18: error: expected '(' or optional integer offset
amomax.w a2, a1, foo # CHECK: :[[@LINE]]:18: error: expected '(' or optional integer offset
amomax.w a2, a1, 1(a0) # CHECK: :[[@LINE]]:18: error: optional integer offset must be 0
amomax.w a2, a1, (foo) # CHECK: :[[@LINE]]:19: error: expected register
amomax.w a2, a1, 0(foo) # CHECK: :[[@LINE]]:20: error: expected register
amomax.w a2, a1, (f0) # CHECK: :[[@LINE]]:19: error: invalid operand for instruction
amomax.w a2, a1, 0(f0) # CHECK: :[[@LINE]]:20: error: invalid operand for instruction
amomax.w a2, a1, 0(a0 # CHECK: :[[@LINE]]:25: error: expected ')'
amomax.w a2, a1, (a0 # CHECK: :[[@LINE]]:25: error: expected ')'
amominu.w a2, a1, a0 # CHECK: :[[@LINE]]:19: error: expected '(' or optional integer offset
amominu.w a2, a1, foo # CHECK: :[[@LINE]]:19: error: expected '(' or optional integer offset
amominu.w a2, a1, 1(a0) # CHECK: :[[@LINE]]:19: error: optional integer offset must be 0
amominu.w a2, a1, (foo) # CHECK: :[[@LINE]]:20: error: expected register
amominu.w a2, a1, 0(foo) # CHECK: :[[@LINE]]:21: error: expected register
amominu.w a2, a1, (f0) # CHECK: :[[@LINE]]:20: error: invalid operand for instruction
amominu.w a2, a1, 0(f0) # CHECK: :[[@LINE]]:21: error: invalid operand for instruction
amominu.w a2, a1, 0(a0 # CHECK: :[[@LINE]]:26: error: expected ')'
amominu.w a2, a1, (a0 # CHECK: :[[@LINE]]:26: error: expected ')'
amomaxu.w a2, a1, a0 # CHECK: :[[@LINE]]:19: error: expected '(' or optional integer offset
amomaxu.w a2, a1, foo # CHECK: :[[@LINE]]:19: error: expected '(' or optional integer offset
amomaxu.w a2, a1, 1(a0) # CHECK: :[[@LINE]]:19: error: optional integer offset must be 0
amomaxu.w a2, a1, (foo) # CHECK: :[[@LINE]]:20: error: expected register
amomaxu.w a2, a1, 0(foo) # CHECK: :[[@LINE]]:21: error: expected register
amomaxu.w a2, a1, (f0) # CHECK: :[[@LINE]]:20: error: invalid operand for instruction
amomaxu.w a2, a1, 0(f0) # CHECK: :[[@LINE]]:21: error: invalid operand for instruction
amomaxu.w a2, a1, 0(a0 # CHECK: :[[@LINE]]:26: error: expected ')'
amomaxu.w a2, a1, (a0 # CHECK: :[[@LINE]]:26: error: expected ')'