1 # RUN: not llvm-mc -triple riscv32 -mattr=+e < %s 2>&1 | FileCheck %s
2 # RUN: llvm-mc -filetype=obj -triple=riscv32 < %s \
3 # RUN: | llvm-objdump -mattr=+e -M no-aliases -d -r - \
4 # RUN: | FileCheck -check-prefix=CHECK-DIS %s
6 # Perform a simple sanity check that registers x16-x31 (and the equivalent
7 # ABI names) are rejected for RV32E, when both assembling and disassembling.
10 # CHECK-DIS: 37 18 00 00 <unknown>
11 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
13 # CHECK-DIS: b7 28 00 00 <unknown>
14 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
16 # CHECK-DIS: 37 39 00 00 <unknown>
17 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
19 # CHECK-DIS: b7 49 00 00 <unknown>
20 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
22 # CHECK-DIS: 37 5a 00 00 <unknown>
23 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
25 # CHECK-DIS: b7 6a 00 00 <unknown>
26 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
28 # CHECK-DIS: 37 7b 00 00 <unknown>
29 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
31 # CHECK-DIS: b7 8b 00 00 <unknown>
32 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
34 # CHECK-DIS: 37 9c 00 00 <unknown>
35 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
37 # CHECK-DIS: b7 ac 00 00 <unknown>
38 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
40 # CHECK-DIS: 37 bd 00 00 <unknown>
41 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
43 # CHECK-DIS: b7 cd 00 00 <unknown>
44 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
46 # CHECK-DIS: 37 de 00 00 <unknown>
47 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
49 # CHECK-DIS: b7 ee 00 00 <unknown>
50 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
52 # CHECK-DIS: 37 ff 00 00 <unknown>
53 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
55 # CHECK-DIS: b7 0f 01 00 <unknown>
56 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
59 # CHECK-DIS: 17 18 01 00 <unknown>
60 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
62 # CHECK-DIS: 97 28 01 00 <unknown>
63 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
65 # CHECK-DIS: 17 39 01 00 <unknown>
66 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
68 # CHECK-DIS: 97 49 01 00 <unknown>
69 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
71 # CHECK-DIS: 17 5a 01 00 <unknown>
72 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
74 # CHECK-DIS: 97 6a 01 00 <unknown>
75 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
77 # CHECK-DIS: 17 7b 01 00 <unknown>
78 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
80 # CHECK-DIS: 97 8b 01 00 <unknown>
81 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
83 # CHECK-DIS: 17 9c 01 00 <unknown>
84 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
86 # CHECK-DIS: 97 ac 01 00 <unknown>
87 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
89 # CHECK-DIS: 17 bd 01 00 <unknown>
90 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
92 # CHECK-DIS: 97 cd 01 00 <unknown>
93 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
95 # CHECK-DIS: 17 de 01 00 <unknown>
96 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
98 # CHECK-DIS: 97 ee 01 00 <unknown>
99 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
101 # CHECK-DIS: 17 ff 01 00 <unknown>
102 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
104 # CHECK-DIS: 97 0f 02 00 <unknown>
105 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction