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
5 # RUN: not llvm-mc -triple riscv64 -mattr=+e < %s 2>&1 | FileCheck %s
6 # RUN: llvm-mc -filetype=obj -triple=riscv64 < %s \
7 # RUN: | llvm-objdump --mattr=+e -M no-aliases -d -r - \
8 # RUN: | FileCheck -check-prefix=CHECK-DIS %s
10 # Perform a simple check that registers x16-x31 (and the equivalent ABI names)
11 # are rejected for RV32E/RV64E, when both assembling and disassembling.
14 # CHECK-DIS: 37 18 00 00 <unknown>
15 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
17 # CHECK-DIS: b7 28 00 00 <unknown>
18 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
20 # CHECK-DIS: 37 39 00 00 <unknown>
21 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
23 # CHECK-DIS: b7 49 00 00 <unknown>
24 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
26 # CHECK-DIS: 37 5a 00 00 <unknown>
27 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
29 # CHECK-DIS: b7 6a 00 00 <unknown>
30 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
32 # CHECK-DIS: 37 7b 00 00 <unknown>
33 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
35 # CHECK-DIS: b7 8b 00 00 <unknown>
36 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
38 # CHECK-DIS: 37 9c 00 00 <unknown>
39 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
41 # CHECK-DIS: b7 ac 00 00 <unknown>
42 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
44 # CHECK-DIS: 37 bd 00 00 <unknown>
45 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
47 # CHECK-DIS: b7 cd 00 00 <unknown>
48 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
50 # CHECK-DIS: 37 de 00 00 <unknown>
51 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
53 # CHECK-DIS: b7 ee 00 00 <unknown>
54 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
56 # CHECK-DIS: 37 ff 00 00 <unknown>
57 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
59 # CHECK-DIS: b7 0f 01 00 <unknown>
60 # CHECK: :[[@LINE+1]]:5: error: invalid operand for instruction
63 # CHECK-DIS: 17 18 01 00 <unknown>
64 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
66 # CHECK-DIS: 97 28 01 00 <unknown>
67 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
69 # CHECK-DIS: 17 39 01 00 <unknown>
70 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
72 # CHECK-DIS: 97 49 01 00 <unknown>
73 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
75 # CHECK-DIS: 17 5a 01 00 <unknown>
76 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
78 # CHECK-DIS: 97 6a 01 00 <unknown>
79 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
81 # CHECK-DIS: 17 7b 01 00 <unknown>
82 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
84 # CHECK-DIS: 97 8b 01 00 <unknown>
85 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
87 # CHECK-DIS: 17 9c 01 00 <unknown>
88 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
90 # CHECK-DIS: 97 ac 01 00 <unknown>
91 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
93 # CHECK-DIS: 17 bd 01 00 <unknown>
94 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
96 # CHECK-DIS: 97 cd 01 00 <unknown>
97 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
99 # CHECK-DIS: 17 de 01 00 <unknown>
100 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
102 # CHECK-DIS: 97 ee 01 00 <unknown>
103 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
105 # CHECK-DIS: 17 ff 01 00 <unknown>
106 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
108 # CHECK-DIS: 97 0f 02 00 <unknown>
109 # CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction