diff mbox

[v9,10/10] target-mips: Add FCR31's FS bit definition

Message ID 1465552668-30084-11-git-send-email-aleksandar.markovic@rt-rk.com (mailing list archive)
State New, archived
Headers show

Commit Message

Aleksandar Markovic June 10, 2016, 9:57 a.m. UTC
From: Aleksandar Markovic <aleksandar.markovic@imgtec.com>

Add preprocessor definition of FCR31's FS bit, and update related
code for setting this bit.

Signed-off-by: Aleksandar Markovic <aleksandar.markovic@imgtec.com>
---
 target-mips/cpu.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Leon Alrae June 14, 2016, 2:12 p.m. UTC | #1
On Fri, Jun 10, 2016 at 11:57:37AM +0200, Aleksandar Markovic wrote:
> From: Aleksandar Markovic <aleksandar.markovic@imgtec.com>
> 
> Add preprocessor definition of FCR31's FS bit, and update related
> code for setting this bit.
> 
> Signed-off-by: Aleksandar Markovic <aleksandar.markovic@imgtec.com>
> ---
>  target-mips/cpu.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Leon Alrae <leon.alrae@imgtec.com>
diff mbox

Patch

diff --git a/target-mips/cpu.h b/target-mips/cpu.h
index 7c81c41..4d2bbdf 100644
--- a/target-mips/cpu.h
+++ b/target-mips/cpu.h
@@ -112,6 +112,7 @@  struct CPUMIPSFPUContext {
     /* fcsr */
     uint32_t fcr31_rw_bitmask;
     uint32_t fcr31;
+#define FCR31_FS 24
 #define FCR31_ABS2008 19
 #define FCR31_NAN2008 18
 #define SET_FP_COND(num,env)     do { ((env).fcr31) |= ((num) ? (1 << ((num) + 24)) : (1 << 23)); } while(0)
@@ -814,7 +815,7 @@  static inline void restore_rounding_mode(CPUMIPSState *env)
 
 static inline void restore_flush_mode(CPUMIPSState *env)
 {
-    set_flush_to_zero((env->active_fpu.fcr31 & (1 << 24)) != 0,
+    set_flush_to_zero((env->active_fpu.fcr31 & (1 << FCR31_FS)) != 0,
                       &env->active_fpu.fp_status);
 }