[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / MC / RISCV / deprecated-csr-names.s
blobf3c475d54699f357df27ae4d7bd7b410a2d15bd4
1 # RUN: llvm-mc -triple riscv32 -riscv-no-aliases -show-encoding %s \
2 # RUN: | FileCheck -check-prefixes CHECK-INST,CHECK-ENC %s
3 # RUN: llvm-mc -filetype obj -triple riscv32 %s \
4 # RUN: | llvm-objdump -d - \
5 # RUN: | FileCheck -check-prefix=CHECK-INST-ALIAS %s
7 # RUN: llvm-mc -triple riscv64 -riscv-no-aliases -show-encoding %s \
8 # RUN: | FileCheck -check-prefixes CHECK-INST,CHECK-ENC %s
9 # RUN: llvm-mc -filetype obj -triple riscv64 %s \
10 # RUN: | llvm-objdump -d - \
11 # RUN: | FileCheck -check-prefix=CHECK-INST-ALIAS %s
13 # RUN: llvm-mc -triple riscv32 %s 2>&1 | FileCheck -check-prefix CHECK-WARN %s
15 # sbadaddr
16 # name
17 # CHECK-INST: csrrw zero, stval, zero
18 # CHECK-ENC: encoding: [0x73,0x10,0x30,0x14]
19 # CHECK-INST-ALIAS: csrw stval, zero
20 # uimm12
21 # CHECK-INST: csrrw zero, stval, zero
22 # CHECK-ENC: encoding: [0x73,0x10,0x30,0x14]
23 # CHECK-INST-ALIAS: csrw stval, zero
24 # name
25 csrw sbadaddr, zero
26 # uimm12
27 csrrw zero, 0x143, zero
29 # CHECK-WARN: warning: 'sbadaddr' is a deprecated alias for 'stval'
31 # mbadaddr
32 # name
33 # CHECK-INST: csrrw zero, mtval, zero
34 # CHECK-ENC: encoding: [0x73,0x10,0x30,0x34]
35 # CHECK-INST-ALIAS: csrw mtval, zero
36 # uimm12
37 # CHECK-INST: csrrw zero, mtval, zero
38 # CHECK-ENC: encoding: [0x73,0x10,0x30,0x34]
39 # CHECK-INST-ALIAS: csrw mtval, zero
40 # name
41 csrw mbadaddr, zero
42 # uimm12
43 csrrw zero, 0x343, zero
45 # CHECK-WARN: warning: 'mbadaddr' is a deprecated alias for 'mtval'
47 # ubadaddr
48 # name
49 # CHECK-INST: csrrw zero, utval, zero
50 # CHECK-ENC: encoding: [0x73,0x10,0x30,0x04]
51 # CHECK-INST-ALIAS: csrw utval, zero
52 # uimm12
53 # CHECK-INST: csrrw zero, utval, zero
54 # CHECK-ENC: encoding: [0x73,0x10,0x30,0x04]
55 # CHECK-INST-ALIAS: csrw utval, zero
56 # name
57 csrw ubadaddr, zero
58 # uimm12
59 csrrw zero, 0x043, zero
61 # CHECK-WARN: warning: 'ubadaddr' is a deprecated alias for 'utval'
63 # sptbr
64 # name
65 # CHECK-INST: csrrw zero, satp, zero
66 # CHECK-ENC: encoding: [0x73,0x10,0x00,0x18]
67 # CHECK-INST-ALIAS: csrw satp, zero
68 # uimm12
69 # CHECK-INST: csrrw zero, satp, zero
70 # CHECK-ENC: encoding: [0x73,0x10,0x00,0x18]
71 # CHECK-INST-ALIAS: csrw satp, zero
72 # name
73 csrw sptbr, zero
74 # uimm12
75 csrrw zero, 0x180, zero
77 # CHECK-WARN: warning: 'sptbr' is a deprecated alias for 'satp'