We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f3e755e commit b443cf3Copy full SHA for b443cf3
riscv-rt/src/asm.rs
@@ -164,12 +164,16 @@ cfg_global_asm!(
164
// INITIALIZE FLOATING POINT UNIT
165
#[cfg(any(riscvf, riscvd))]
166
cfg_global_asm!(
167
+ "
168
+ li t0, 0x4000 // bit 14 is FS most significant bit
169
+ li t2, 0x2000 // bit 13 is FS least significant bit
170
+ ",
171
#[cfg(feature = "s-mode")]
- "csrrc x0, sstatus, 0x4000
- csrrs x0, sstatus, 0x2000",
172
+ "csrrc x0, sstatus, t0
173
+ csrrs x0, sstatus, t2",
174
#[cfg(not(feature = "s-mode"))]
- "csrrc x0, mstatus, 0x4000
- csrrs x0, mstatus, 0x2000",
175
+ "csrrc x0, mstatus, t0
176
+ csrrs x0, mstatus, t2",
177
"fscsr x0",
178
);
179
// ZERO OUT FLOATING POINT REGISTERS
0 commit comments