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=+f < %s \
4 # RUN: | llvm-objdump -d -mattr=+f - \
5 # RUN: | FileCheck -check-prefix=CHECK-INST-ALIAS %s
6 # RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+f < %s \
7 # RUN: | llvm-objdump -d - \
8 # RUN: | FileCheck -check-prefix=CHECK-INST-ALIAS-NO-F %s
10 # RUN: llvm-mc %s -triple=riscv64 -riscv-no-aliases -mattr=+f -show-encoding \
11 # RUN: | FileCheck -check-prefixes=CHECK-INST,CHECK-ENC %s
12 # RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+f < %s \
13 # RUN: | llvm-objdump -d -mattr=+f - \
14 # RUN: | FileCheck -check-prefix=CHECK-INST-ALIAS %s
15 # RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+f < %s \
16 # RUN: | llvm-objdump -d - \
17 # RUN: | FileCheck -check-prefix=CHECK-INST-ALIAS-NO-F %s
19 ##################################
20 # User Floating Pont CSRs
21 ##################################
25 # CHECK-INST: csrrs t1, fflags, zero
26 # CHECK-ENC: encoding: [0x73,0x23,0x10,0x00]
27 # CHECK-INST-ALIAS: frflags t1
28 # CHECK-INST-ALIAS-NO-F: csrr t1, fflags
30 # CHECK-INST: csrrs t2, fflags, zero
31 # CHECK-ENC: encoding: [0xf3,0x23,0x10,0x00]
32 # CHECK-INST-ALIAS: frflags t2
33 # CHECK-INST-ALIAS-NO-F: csrr t2, fflags
35 csrrs t1
, fflags
, zero
41 # CHECK-INST: csrrs t1, frm, zero
42 # CHECK-ENC: encoding: [0x73,0x23,0x20,0x00]
43 # CHECK-INST-ALIAS: frrm t1
44 # CHECK-INST-ALIAS-NO-F: csrr t1, frm
46 # CHECK-INST: csrrs t2, frm, zero
47 # CHECK-ENC: encoding: [0xf3,0x23,0x20,0x00]
48 # CHECK-INST-ALIAS: frrm t2
49 # CHECK-INST-ALIAS-NO-F: csrr t2, frm
57 # CHECK-INST: csrrs t1, fcsr, zero
58 # CHECK-ENC: encoding: [0x73,0x23,0x30,0x00]
59 # CHECK-INST-ALIAS: frcsr t1
60 # CHECK-INST-ALIAS-NO-F: csrr t1, fcsr
62 # CHECK-INST: csrrs t2, fcsr, zero
63 # CHECK-ENC: encoding: [0xf3,0x23,0x30,0x00]
64 # CHECK-INST-ALIAS: frcsr t2
65 # CHECK-INST-ALIAS-NO-F: csrr t2, fcsr