1 # RUN: llvm-mc %s -triple=riscv32 -riscv-no-aliases -mattr=+f -show-encoding \
2 # RUN: | FileCheck -check-prefixes=CHECK-INST,CHECK-ENC %s
3 # RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+v < %s \
4 # RUN: | llvm-objdump -d --mattr=+v - \
5 # RUN: | FileCheck -check-prefix=CHECK-INST-ALIAS %s
7 # RUN: llvm-mc %s -triple=riscv64 -riscv-no-aliases -mattr=+f -show-encoding \
8 # RUN: | FileCheck -check-prefixes=CHECK-INST,CHECK-ENC %s
9 # RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+v < %s \
10 # RUN: | llvm-objdump -d --mattr=+v - \
11 # RUN: | FileCheck -check-prefix=CHECK-INST-ALIAS %s
13 ##################################
15 ##################################
19 # CHECK-INST: csrrs t1, vstart, zero
20 # CHECK-ENC: encoding: [0x73,0x23,0x80,0x00]
21 # CHECK-INST-ALIAS: csrr t1, vstart
23 # CHECK-INST: csrrs t2, vstart, zero
24 # CHECK-ENC: encoding: [0xf3,0x23,0x80,0x00]
25 # CHECK-INST-ALIAS: csrr t2, vstart
27 csrrs t1
, vstart
, zero
33 # CHECK-INST: csrrs t1, vxsat, zero
34 # CHECK-ENC: encoding: [0x73,0x23,0x90,0x00]
35 # CHECK-INST-ALIAS: csrr t1, vxsat
37 # CHECK-INST: csrrs t2, vxsat, zero
38 # CHECK-ENC: encoding: [0xf3,0x23,0x90,0x00]
39 # CHECK-INST-ALIAS: csrr t2, vxsat
47 # CHECK-INST: csrrs t1, vxrm, zero
48 # CHECK-ENC: encoding: [0x73,0x23,0xa0,0x00]
49 # CHECK-INST-ALIAS: csrr t1, vxrm
51 # CHECK-INST: csrrs t2, vxrm, zero
52 # CHECK-ENC: encoding: [0xf3,0x23,0xa0,0x00]
53 # CHECK-INST-ALIAS: csrr t2, vxrm
61 # CHECK-INST: csrrs t1, vl, zero
62 # CHECK-ENC: encoding: [0x73,0x23,0x00,0xc2]
63 # CHECK-INST-ALIAS: csrr t1, vl
65 # CHECK-INST: csrrs t2, vl, zero
66 # CHECK-ENC: encoding: [0xf3,0x23,0x00,0xc2]
67 # CHECK-INST-ALIAS: csrr t2, vl
75 # CHECK-INST: csrrs t1, vtype, zero
76 # CHECK-ENC: encoding: [0x73,0x23,0x10,0xc2]
77 # CHECK-INST-ALIAS: csrr t1, vtype
79 # CHECK-INST: csrrs t2, vtype, zero
80 # CHECK-ENC: encoding: [0xf3,0x23,0x10,0xc2]
81 # CHECK-INST-ALIAS: csrr t2, vtype
89 # CHECK-INST: csrrs t1, vlenb, zero
90 # CHECK-ENC: encoding: [0x73,0x23,0x20,0xc2]
91 # CHECK-INST-ALIAS: csrr t1, vlenb
93 # CHECK-INST: csrrs t2, vlenb, zero
94 # CHECK-ENC: encoding: [0xf3,0x23,0x20,0xc2]
95 # CHECK-INST-ALIAS: csrr t2, vlenb