1 # RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+f < %s \
2 # RUN: | llvm-objdump -d -mattr=+f -M no-aliases - \
3 # RUN: | FileCheck -check-prefix=CHECK-INST %s
4 # RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+f < %s \
5 # RUN: | llvm-objdump -d -mattr=+f - \
6 # RUN: | FileCheck -check-prefix=CHECK-ALIAS %s
7 # RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+f < %s \
8 # RUN: | llvm-objdump -d -mattr=+f - \
9 # RUN: | FileCheck -check-prefix=CHECK-EXT-F %s
10 # RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=-f < %s \
11 # RUN: | llvm-objdump -d -mattr=+f - \
12 # RUN: | FileCheck -check-prefix=CHECK-EXT-F %s
13 # RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=-f < %s \
14 # RUN: | llvm-objdump -d -mattr=-f - \
15 # RUN: | FileCheck -check-prefix=CHECK-EXT-F-OFF %s
16 # RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+f < %s \
17 # RUN: | llvm-objdump -d -mattr=-f - \
18 # RUN: | FileCheck -check-prefix=CHECK-EXT-F-OFF %s
20 # RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+f < %s \
21 # RUN: | llvm-objdump -d -mattr=+f -M no-aliases - \
22 # RUN: | FileCheck -check-prefix=CHECK-INST %s
23 # RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+f < %s \
24 # RUN: | llvm-objdump -d -mattr=+f - \
25 # RUN: | FileCheck -check-prefix=CHECK-ALIAS %s
26 # RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+f < %s \
27 # RUN: | llvm-objdump -d -mattr=+f - \
28 # RUN: | FileCheck -check-prefix=CHECK-EXT-F %s
29 # RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=-f < %s \
30 # RUN: | llvm-objdump -d -mattr=+f - \
31 # RUN: | FileCheck -check-prefix=CHECK-EXT-F %s
32 # RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=-f < %s \
33 # RUN: | llvm-objdump -d -mattr=-f - \
34 # RUN: | FileCheck -check-prefix=CHECK-EXT-F-OFF %s
35 # RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+f < %s \
36 # RUN: | llvm-objdump -d -mattr=-f - \
37 # RUN: | FileCheck -check-prefix=CHECK-EXT-F-OFF %s
40 # CHECK-INST: csrrs t0, fcsr, zero
41 # CHECK-ALIAS: frcsr t0
42 # CHECK-EXT-F: frcsr t0
43 # CHECK-EXT-F-OFF: csrr t0, fcsr
46 # CHECK-INST: csrrw t1, fcsr, t2
47 # CHECK-ALIAS: fscsr t1, t2
48 # CHECK-EXT-F-ON: fscsr t1, t2
49 # CHECK-EXT-F-OFF: csrrw t1, fcsr, t2
52 # CHECK-INST: csrrw zero, fcsr, t2
53 # CHECK-ALIAS: fscsr t2
54 # CHECK-EXT-F-ON: fscsr t2
55 # CHECK-EXT-F-OFF: csrw fcsr, t2
58 # CHECK-INST: csrrw zero, fcsr, t2
59 # CHECK-ALIAS: fscsr t2
60 # CHECK-EXT-F-ON: fscsr t2
61 # CHECK-EXT-F-OFF: csrw fcsr, t2
64 # CHECK-INST: csrrw t0, frm, zero
65 # CHECK-ALIAS: fsrm t0, zero
66 # CHECK-EXT-F-ON: fsrm t0, zero
67 # CHECK-EXT-F-OFF: csrrw t0, frm
70 # CHECK-INST: csrrw t0, frm, t1
71 # CHECK-ALIAS: fsrm t0, t1
72 # CHECK-EXT-F-ON: fsrm t0, t1
73 # CHECK-EXT-F-OFF: csrrw t0, frm, t1
76 # CHECK-INST: csrrwi t0, frm, 31
77 # CHECK-ALIAS: fsrmi t0, 31
78 # CHECK-EXT-F-ON: fsrmi t0, 31
79 # CHECK-EXT-F-OFF: csrrwi t0, frm, 31
82 # CHECK-INST: csrrwi zero, frm, 31
83 # CHECK-ALIAS: fsrmi 31
84 # CHECK-EXT-F-ON: fsrmi 31
85 # CHECK-EXT-F-OFF: csrwi frm, 31
88 # CHECK-INST: csrrs t0, fflags, zero
89 # CHECK-ALIAS: frflags t0
90 # CHECK-EXT-F-ON: frflags t0
91 # CHECK-EXT-F-OFF: csrr t0, fflags
94 # CHECK-INST: csrrw t0, fflags, t2
95 # CHECK-ALIAS: fsflags t0, t2
96 # CHECK-EXT-F-ON: fsflags t0, t2
97 # CHECK-EXT-F-OFF: csrrw t0, fflags, t2
100 # CHECK-INST: csrrw zero, fflags, t2
101 # CHECK-ALIAS: fsflags t2
102 # CHECK-EXT-F-ON: fsflags t2
103 # CHECK-EXT-F-OFF: csrw fflags, t2
106 # CHECK-INST: csrrwi t0, fflags, 31
107 # CHECK-ALIAS: fsflagsi t0, 31
108 # CHECK-EXT-F: fsflagsi t0, 31
109 # CHECK-EXT-F-OFF: csrrwi t0, fflags, 31
112 # CHECK-INST: csrrwi zero, fflags, 31
113 # CHECK-ALIAS: fsflagsi 31
114 # CHECK-EXT-F: fsflagsi 31
115 # CHECK-EXT-F-OFF: csrwi fflags, 31