Patchwork [4/9] target-sh4: use default-NaN mode

login
register
mail settings
Submitter Aurelien Jarno
Date Jan. 11, 2011, 9:01 p.m.
Message ID <1294779698-17694-5-git-send-email-aurelien@aurel32.net>
Download mbox | patch
Permalink /patch/78438/
State New
Headers show

Comments

Aurelien Jarno - Jan. 11, 2011, 9:01 p.m.
SH4 FPU doesn't propagate NaN, and instead always regenerate new ones.
Enable the default-NaN mode by default.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
 target-sh4/translate.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Patch

diff --git a/target-sh4/translate.c b/target-sh4/translate.c
index 155629e..8d59bf9 100644
--- a/target-sh4/translate.c
+++ b/target-sh4/translate.c
@@ -206,6 +206,7 @@  static void cpu_sh4_reset(CPUSH4State * env)
     env->fpscr = 0x00040001; /* CPU reset value according to SH4 manual */
     set_float_rounding_mode(float_round_to_zero, &env->fp_status);
 #endif
+    set_default_nan_mode(1, &env->vfp.fp_status);
     env->mmucr = 0;
 }