Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / RISCV / deprecated-csr-names.s
blobe895732ae23f6c5bafae7cb2c0c69962aecc79c0
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 # sptbr
48 # name
49 # CHECK-INST: csrrw zero, satp, zero
50 # CHECK-ENC: encoding: [0x73,0x10,0x00,0x18]
51 # CHECK-INST-ALIAS: csrw satp, zero
52 # uimm12
53 # CHECK-INST: csrrw zero, satp, zero
54 # CHECK-ENC: encoding: [0x73,0x10,0x00,0x18]
55 # CHECK-INST-ALIAS: csrw satp, zero
56 # name
57 csrw sptbr, zero
58 # uimm12
59 csrrw zero, 0x180, zero
61 # CHECK-WARN: warning: 'sptbr' is a deprecated alias for 'satp'