target/riscv: Use TB_FLAGS_MSTATUS_FS for floating point
authorAlistair Francis <alistair.francis@wdc.com>
Fri, 23 Aug 2019 15:21:25 +0000 (08:21 -0700)
committerPalmer Dabbelt <palmer@sifive.com>
Tue, 17 Sep 2019 15:42:50 +0000 (08:42 -0700)
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

index 16efe8c860d3c5d5dff75dcd9a7fc4fffb7601e1..124ed33ee4e2e2667673d0d0d26d08b1276ad32e 100644 (file)
@@ -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
 }