diff mbox series

[PULL,47/48] target/riscv: Use TB_FLAGS_MSTATUS_FS for floating point

Message ID 20190918145640.17349-48-palmer@sifive.com (mailing list archive)
State New, archived
Headers show
Series [PULL,01/48] riscv: sifive_u: Add support for loading initrd | expand

Commit Message

Palmer Dabbelt Sept. 18, 2019, 2:56 p.m. UTC
From: Alistair Francis <alistair.francis@wdc.com>

Use the TB_FLAGS_MSTATUS_FS macro when enabling floating point in the tb
flags.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Palmer Dabbelt <palmer@sifive.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
---
 target/riscv/cpu.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h
index 16efe8c860..124ed33ee4 100644
--- a/target/riscv/cpu.h
+++ b/target/riscv/cpu.h
@@ -301,7 +301,7 @@  static inline void cpu_get_tb_cpu_state(CPURISCVState *env, target_ulong *pc,
 #else
     *flags = cpu_mmu_index(env, 0);
     if (riscv_cpu_fp_enabled(env)) {
-        *flags |= env->mstatus & MSTATUS_FS;
+        *flags |= TB_FLAGS_MSTATUS_FS;
     }
 #endif
 }