qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 090/111] m68k: correctly define and manage NaN
@ 2011-08-17 20:53 Bryce Lanham
  2011-08-17 20:53 ` [Qemu-devel] [PATCH 091/111] m68k: don't call gdb_register_coprocessor() twice Bryce Lanham
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Bryce Lanham @ 2011-08-17 20:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: Laurent Vivier

From: Laurent Vivier <laurent@vivier.eu>

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 fpu/softfloat-specialize.h |    5 +++++
 target-m68k/helper.c       |   12 +++++-------
 target-m68k/translate.c    |    1 -
 3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/fpu/softfloat-specialize.h b/fpu/softfloat-specialize.h
index e051549..4a4863c 100644
--- a/fpu/softfloat-specialize.h
+++ b/fpu/softfloat-specialize.h
@@ -85,9 +85,14 @@ const float64 float64_default_nan = const_float64(LIT64( 0xFFF8000000000000 ));
 #define floatx80_default_nan_high 0x7FFF
 #define floatx80_default_nan_low  LIT64( 0xBFFFFFFFFFFFFFFF )
 #else
+#if defined(TARGET_M68K)
+#define floatx80_default_nan_high 0x7FFF
+#define floatx80_default_nan_low  LIT64( 0xFFFFFFFFFFFFFFFF )
+#else
 #define floatx80_default_nan_high 0xFFFF
 #define floatx80_default_nan_low  LIT64( 0xC000000000000000 )
 #endif
+#endif
 
 const floatx80 floatx80_default_nan = make_floatx80(floatx80_default_nan_high,
                                                     floatx80_default_nan_low);
diff --git a/target-m68k/helper.c b/target-m68k/helper.c
index 533f33b..4edbc90 100644
--- a/target-m68k/helper.c
+++ b/target-m68k/helper.c
@@ -23,7 +23,6 @@
 
 #include "config.h"
 #include "cpu.h"
-#include "exec.h"
 #include "qemu-common.h"
 #include "gdbstub.h"
 
@@ -272,13 +271,12 @@ void cpu_reset(CPUM68KState *env)
     m68k_switch_sp(env);
 
     for (i = 0; i < 8; i++) {
-        env->fregs[i].l.upper = floatx80_default_nan_high;
-        env->fregs[i].l.lower = 0xffffffffffffffffULL;
+        env->fregs[i].d = floatx80_default_nan;
     }
-    env->fp0h = floatx80_default_nan_high;
-    env->fp0l = 0xffffffffffffffffULL;
-    env->fp1h = floatx80_default_nan_high;
-    env->fp1l = 0xffffffffffffffffULL;
+    env->fp0h = floatx80_default_nan.high;
+    env->fp0l = floatx80_default_nan.low;
+    env->fp1h = floatx80_default_nan.high;
+    env->fp1l = floatx80_default_nan.low;
 
     env->cc_op = CC_OP_FLAGS;
     /* TODO: We should set PC from the interrupt vector.  */
diff --git a/target-m68k/translate.c b/target-m68k/translate.c
index 70eba1a..b749a76 100644
--- a/target-m68k/translate.c
+++ b/target-m68k/translate.c
@@ -25,7 +25,6 @@
 
 #include "config.h"
 #include "cpu.h"
-#include "exec.h"
 #include "disas.h"
 #include "tcg-op.h"
 #include "qemu-log.h"
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-08-17 20:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-17 20:53 [Qemu-devel] [PATCH 090/111] m68k: correctly define and manage NaN Bryce Lanham
2011-08-17 20:53 ` [Qemu-devel] [PATCH 091/111] m68k: don't call gdb_register_coprocessor() twice Bryce Lanham
2011-08-17 20:53 ` [Qemu-devel] [PATCH 092/111] m68k: gdb FP registers are 96 bits Bryce Lanham
2011-08-17 20:53 ` [Qemu-devel] [PATCH 093/111] m68k: add exg instruction Bryce Lanham
2011-08-17 20:53 ` [Qemu-devel] [PATCH 094/111] m68k: define floatx80_default_inf_high and floatx80_default_inf_low Bryce Lanham
2011-08-17 20:53 ` [Qemu-devel] [PATCH 095/111] m68k: add bkpt instruction Bryce Lanham
2011-08-17 20:53 ` [Qemu-devel] [PATCH 096/111] m68k: correctly convert floatx80<->long double Bryce Lanham
2011-08-17 20:53 ` [Qemu-devel] [PATCH 097/111] m68k: use expl() to compute exp_FP0() Bryce Lanham
2011-08-17 20:53 ` [Qemu-devel] [PATCH 098/111] m68k: use exp2l() to compute exp2_FP0() Bryce Lanham
2011-08-17 20:53 ` [Qemu-devel] [PATCH 099/111] m68k: use logl() to compute ln_FP0() Bryce Lanham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).