qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [4234] Move 128-bit float emulation under linux-user


From: Blue Swirl
Subject: [Qemu-devel] [4234] Move 128-bit float emulation under linux-user
Date: Tue, 22 Apr 2008 16:42:41 +0000

Revision: 4234
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4234
Author:   blueswir1
Date:     2008-04-22 16:42:40 +0000 (Tue, 22 Apr 2008)

Log Message:
-----------
Move 128-bit float emulation under linux-user

Modified Paths:
--------------
    trunk/Makefile.target
    trunk/target-sparc/op_helper.c

Modified: trunk/Makefile.target
===================================================================
--- trunk/Makefile.target       2008-04-22 06:49:43 UTC (rev 4233)
+++ trunk/Makefile.target       2008-04-22 16:42:40 UTC (rev 4234)
@@ -432,6 +432,9 @@
 ifeq ($(TARGET_ARCH), m68k)
 OBJS+= m68k-sim.o m68k-semi.o
 endif
+ifeq ($(TARGET_BASE_ARCH), sparc)
+OBJS+= sparc_quad_float.o
+endif
 
 ifdef CONFIG_GDBSTUB
 OBJS+=gdbstub.o

Modified: trunk/target-sparc/op_helper.c
===================================================================
--- trunk/target-sparc/op_helper.c      2008-04-22 06:49:43 UTC (rev 4233)
+++ trunk/target-sparc/op_helper.c      2008-04-22 16:42:40 UTC (rev 4234)
@@ -58,7 +58,6 @@
 
 #define F_HELPER(name, p) void helper_f##name##p(void)
 
-#if defined(CONFIG_USER_ONLY)
 #define F_BINOP(name)                                           \
     F_HELPER(name, s)                                           \
     {                                                           \
@@ -67,22 +66,7 @@
     F_HELPER(name, d)                                           \
     {                                                           \
         DT0 = float64_ ## name (DT0, DT1, &env->fp_status);     \
-    }                                                           \
-    F_HELPER(name, q)                                           \
-    {                                                           \
-        QT0 = float128_ ## name (QT0, QT1, &env->fp_status);    \
     }
-#else
-#define F_BINOP(name)                                           \
-    F_HELPER(name, s)                                           \
-    {                                                           \
-        FT0 = float32_ ## name (FT0, FT1, &env->fp_status);     \
-    }                                                           \
-    F_HELPER(name, d)                                           \
-    {                                                           \
-        DT0 = float64_ ## name (DT0, DT1, &env->fp_status);     \
-    }
-#endif
 
 F_BINOP(add);
 F_BINOP(sub);
@@ -97,15 +81,6 @@
                       &env->fp_status);
 }
 
-#if defined(CONFIG_USER_ONLY)
-void helper_fdmulq(void)
-{
-    QT0 = float128_mul(float64_to_float128(DT0, &env->fp_status),
-                       float64_to_float128(DT1, &env->fp_status),
-                       &env->fp_status);
-}
-#endif
-
 F_HELPER(neg, s)
 {
     FT0 = float32_chs(FT1);
@@ -116,14 +91,7 @@
 {
     DT0 = float64_chs(DT1);
 }
-
-#if defined(CONFIG_USER_ONLY)
-F_HELPER(neg, q)
-{
-    QT0 = float128_chs(QT1);
-}
 #endif
-#endif
 
 /* Integer to float conversion.  */
 F_HELPER(ito, s)
@@ -136,13 +104,6 @@
     DT0 = int32_to_float64(*((int32_t *)&FT1), &env->fp_status);
 }
 
-#if defined(CONFIG_USER_ONLY)
-F_HELPER(ito, q)
-{
-    QT0 = int32_to_float128(*((int32_t *)&FT1), &env->fp_status);
-}
-#endif
-
 #ifdef TARGET_SPARC64
 F_HELPER(xto, s)
 {
@@ -153,13 +114,7 @@
 {
     DT0 = int64_to_float64(*((int64_t *)&DT1), &env->fp_status);
 }
-#if defined(CONFIG_USER_ONLY)
-F_HELPER(xto, q)
-{
-    QT0 = int64_to_float128(*((int64_t *)&DT1), &env->fp_status);
-}
 #endif
-#endif
 #undef F_HELPER
 
 /* floating point conversion */
@@ -173,28 +128,6 @@
     DT0 = float32_to_float64(FT1, &env->fp_status);
 }
 
-#if defined(CONFIG_USER_ONLY)
-void helper_fqtos(void)
-{
-    FT0 = float128_to_float32(QT1, &env->fp_status);
-}
-
-void helper_fstoq(void)
-{
-    QT0 = float32_to_float128(FT1, &env->fp_status);
-}
-
-void helper_fqtod(void)
-{
-    DT0 = float128_to_float64(QT1, &env->fp_status);
-}
-
-void helper_fdtoq(void)
-{
-    QT0 = float64_to_float128(DT1, &env->fp_status);
-}
-#endif
-
 /* Float to integer conversion.  */
 void helper_fstoi(void)
 {
@@ -206,13 +139,6 @@
     *((int32_t *)&FT0) = float64_to_int32_round_to_zero(DT1, &env->fp_status);
 }
 
-#if defined(CONFIG_USER_ONLY)
-void helper_fqtoi(void)
-{
-    *((int32_t *)&FT0) = float128_to_int32_round_to_zero(QT1, &env->fp_status);
-}
-#endif
-
 #ifdef TARGET_SPARC64
 void helper_fstox(void)
 {
@@ -224,13 +150,6 @@
     *((int64_t *)&DT0) = float64_to_int64_round_to_zero(DT1, &env->fp_status);
 }
 
-#if defined(CONFIG_USER_ONLY)
-void helper_fqtox(void)
-{
-    *((int64_t *)&DT0) = float128_to_int64_round_to_zero(QT1, &env->fp_status);
-}
-#endif
-
 void helper_faligndata(void)
 {
     uint64_t tmp;
@@ -718,14 +637,7 @@
 {
     DT0 = float64_abs(DT1);
 }
-
-#if defined(CONFIG_USER_ONLY)
-void helper_fabsq(void)
-{
-    QT0 = float128_abs(QT1);
-}
 #endif
-#endif
 
 void helper_fsqrts(void)
 {
@@ -737,13 +649,6 @@
     DT0 = float64_sqrt(DT1, &env->fp_status);
 }
 
-#if defined(CONFIG_USER_ONLY)
-void helper_fsqrtq(void)
-{
-    QT0 = float128_sqrt(QT1, &env->fp_status);
-}
-#endif
-
 #define GEN_FCMP(name, size, reg1, reg2, FS, TRAP)                      \
     void glue(helper_, name) (void)                                     \
     {                                                                   \
@@ -781,11 +686,6 @@
 GEN_FCMP(fcmpes, float32, FT0, FT1, 0, 1);
 GEN_FCMP(fcmped, float64, DT0, DT1, 0, 1);
 
-#ifdef CONFIG_USER_ONLY
-GEN_FCMP(fcmpq, float128, QT0, QT1, 0, 0);
-GEN_FCMP(fcmpeq, float128, QT0, QT1, 0, 1);
-#endif
-
 #ifdef TARGET_SPARC64
 GEN_FCMP(fcmps_fcc1, float32, FT0, FT1, 22, 0);
 GEN_FCMP(fcmpd_fcc1, float64, DT0, DT1, 22, 0);
@@ -804,15 +704,7 @@
 
 GEN_FCMP(fcmpes_fcc3, float32, FT0, FT1, 26, 1);
 GEN_FCMP(fcmped_fcc3, float64, DT0, DT1, 26, 1);
-#ifdef CONFIG_USER_ONLY
-GEN_FCMP(fcmpq_fcc1, float128, QT0, QT1, 22, 0);
-GEN_FCMP(fcmpq_fcc2, float128, QT0, QT1, 24, 0);
-GEN_FCMP(fcmpq_fcc3, float128, QT0, QT1, 26, 0);
-GEN_FCMP(fcmpeq_fcc1, float128, QT0, QT1, 22, 1);
-GEN_FCMP(fcmpeq_fcc2, float128, QT0, QT1, 24, 1);
-GEN_FCMP(fcmpeq_fcc3, float128, QT0, QT1, 26, 1);
 #endif
-#endif
 
 #if !defined(TARGET_SPARC64) && !defined(CONFIG_USER_ONLY) && 
defined(DEBUG_MXCC)
 static void dump_mxcc(CPUState *env)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]