Skip to contentSkip to conversation

[5193] Convert rest of ops using float32 to TCG, remove FT0 and FT1

Qemu-devel Blue Swirl 1 participant 1 message Sep 10, 2008

lore
Share & tools
lore

Blue Swirl

author
#0 lore raw

Revision: 5193

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5193
Author:   blueswir1
Date:     2008-09-10 20:09:22 +0000 (Wed, 10 Sep 2008)

Log Message:
-----------
Convert rest of ops using float32 to TCG, remove FT0 and FT1

Modified Paths:
--------------
trunk/target-sparc/cpu.h
trunk/target-sparc/exec.h
trunk/target-sparc/helper.h
trunk/target-sparc/op_helper.c
trunk/target-sparc/translate.c

Modified: trunk/target-sparc/cpu.h
===================================================================

target-sparc/cpu.h +0 -1
@@ -303,7 +303,6 @@
     uint64_t prom_addr;
 #endif
     /* temporary float registers */
-    float32 ft0, ft1;
     float64 dt0, dt1;
     float128 qt0, qt1;
     float_status fp_status;

Modified: trunk/target-sparc/exec.h
===================================================================

target-sparc/exec.h +0 -2
@@ -5,8 +5,6 @@
 
 register struct CPUSPARCState *env asm(AREG0);
 
-#define FT0 (env->ft0)
-#define FT1 (env->ft1)
 #define DT0 (env->dt0)
 #define DT1 (env->dt1)
 #define QT0 (env->qt0)

Modified: trunk/target-sparc/helper.h
===================================================================

target-sparc/helper.h +8 -11
@@ -93,10 +93,6 @@
 #endif
 DEF_HELPER(void, raise_exception, (int tt))
 #define F_HELPER_0_0(name) DEF_HELPER(void, helper_f ## name, (void))
-#define F_HELPER_SDQ_0_0(name)                  \
-    F_HELPER_0_0(name ## s);                    \
-    F_HELPER_0_0(name ## d);                    \
-    F_HELPER_0_0(name ## q)
 #define F_HELPER_DQ_0_0(name)                   \
     F_HELPER_0_0(name ## d);                    \
     F_HELPER_0_0(name ## q)
@@ -111,11 +107,11 @@
 DEF_HELPER(float32, helper_fmuls, (float32 src1, float32 src2))
 DEF_HELPER(float32, helper_fdivs, (float32 src1, float32 src2))
 
-F_HELPER_0_0(smuld);
+DEF_HELPER(void, helper_fsmuld, (float32 src1, float32 src2))
 F_HELPER_0_0(dmulq);
 
 DEF_HELPER(float32, helper_fnegs, (float32 src))
-F_HELPER_0_0(itod);
+DEF_HELPER(void, helper_fitod, (int32_t src))
 DEF_HELPER(void, helper_fitoq, (int32_t src))
 
 DEF_HELPER(float32, helper_fitos, (int32_t src))
@@ -123,19 +119,20 @@
 #ifdef TARGET_SPARC64
 DEF_HELPER(void, helper_fnegd, (void))
 DEF_HELPER(void, helper_fnegq, (void))
-F_HELPER_SDQ_0_0(xto);
+DEF_HELPER(uint32_t, helper_fxtos, (void))
+F_HELPER_DQ_0_0(xto);
 #endif
-F_HELPER_0_0(dtos);
-F_HELPER_0_0(stod);
+DEF_HELPER(float32, helper_fdtos, (void))
+DEF_HELPER(void, helper_fstod, (float32 src))
 DEF_HELPER(float32, helper_fqtos, (void))
 DEF_HELPER(void, helper_fstoq, (float32 src))
 F_HELPER_0_0(qtod);
 F_HELPER_0_0(dtoq);
 DEF_HELPER(int32_t, helper_fstoi, (float32 src))
-F_HELPER_0_0(dtoi);
+DEF_HELPER(int32_t, helper_fdtoi, (void))
 DEF_HELPER(int32_t, helper_fqtoi, (void))
 #ifdef TARGET_SPARC64
-F_HELPER_0_0(stox);
+DEF_HELPER(void, helper_fstox, (uint32_t src))
 F_HELPER_0_0(dtox);
 F_HELPER_0_0(qtox);
 F_HELPER_0_0(aligndata);

Modified: trunk/target-sparc/op_helper.c
===================================================================

target-sparc/op_helper.c +15 -15
@@ -106,10 +106,10 @@
 F_BINOP(div);
 #undef F_BINOP
 
-void helper_fsmuld(void)
+void helper_fsmuld(float32 src1, float32 src2)
 {
-    DT0 = float64_mul(float32_to_float64(FT0, &env->fp_status),
-                      float32_to_float64(FT1, &env->fp_status),
+    DT0 = float64_mul(float32_to_float64(src1, &env->fp_status),
+                      float32_to_float64(src2, &env->fp_status),
                       &env->fp_status);
 }
 
@@ -143,9 +143,9 @@
     return int32_to_float32(src, &env->fp_status);
 }
 
-F_HELPER(ito, d)
+void helper_fitod(int32_t src)
 {
-    DT0 = int32_to_float64(*((int32_t *)&FT1), &env->fp_status);
+    DT0 = int32_to_float64(src, &env->fp_status);
 }
 
 void helper_fitoq(int32_t src)
@@ -154,9 +154,9 @@
 }
 
 #ifdef TARGET_SPARC64
-F_HELPER(xto, s)
+float32 helper_fxtos(void)
 {
-    FT0 = int64_to_float32(*((int64_t *)&DT1), &env->fp_status);
+    return int64_to_float32(*((int64_t *)&DT1), &env->fp_status);
 }
 
 F_HELPER(xto, d)
@@ -172,14 +172,14 @@
 #undef F_HELPER
 
 /* floating point conversion */
-void helper_fdtos(void)
+float32 helper_fdtos(void)
 {
-    FT0 = float64_to_float32(DT1, &env->fp_status);
+    return float64_to_float32(DT1, &env->fp_status);
 }
 
-void helper_fstod(void)
+void helper_fstod(float32 src)
 {
-    DT0 = float32_to_float64(FT1, &env->fp_status);
+    DT0 = float32_to_float64(src, &env->fp_status);
 }
 
 float32 helper_fqtos(void)
@@ -208,9 +208,9 @@
     return float32_to_int32_round_to_zero(src, &env->fp_status);
 }
 
-void helper_fdtoi(void)
+int32_t helper_fdtoi(void)
 {
-    *((int32_t *)&FT0) = float64_to_int32_round_to_zero(DT1, &env->fp_status);
+    return float64_to_int32_round_to_zero(DT1, &env->fp_status);
 }
 
 int32_t helper_fqtoi(void)
@@ -219,9 +219,9 @@
 }
 
 #ifdef TARGET_SPARC64
-void helper_fstox(void)
+void helper_fstox(float32 src)
 {
-    *((int64_t *)&DT0) = float32_to_int64_round_to_zero(FT1, &env->fp_status);
+    *((int64_t *)&DT0) = float32_to_int64_round_to_zero(src, &env->fp_status);
 }
 
 void helper_fdtox(void)

Modified: trunk/target-sparc/translate.c
===================================================================

target-sparc/translate.c +16 -35

105 lines not on this page · raw message