summaryrefslogtreecommitdiff
path: root/target-sparc/op_helper.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-10-10 17:46:24 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-10-10 17:46:24 +0000
commita0c4cb4a7026977266d08d3e6af27d4dd04ed1e4 (patch)
tree5c326bbae06343ba7defa375da6c4d9417dad4bb /target-sparc/op_helper.c
parent188d857911636fa43628eb8a7beeab4702636317 (diff)
downloadqemu-a0c4cb4a7026977266d08d3e6af27d4dd04ed1e4.tar.gz
qemu-a0c4cb4a7026977266d08d3e6af27d4dd04ed1e4.tar.bz2
qemu-a0c4cb4a7026977266d08d3e6af27d4dd04ed1e4.zip
sparc fixes
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1117 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sparc/op_helper.c')
-rw-r--r--target-sparc/op_helper.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c
index 909639af0f..3a6de7cfc2 100644
--- a/target-sparc/op_helper.c
+++ b/target-sparc/op_helper.c
@@ -2,22 +2,34 @@
#include <fenv.h>
#include "exec.h"
-void OPPROTO do_fabss(void)
+#ifdef USE_INT_TO_FLOAT_HELPERS
+void do_fitos(void)
+{
+ FT0 = (float) *((int32_t *)&FT1);
+}
+
+void do_fitod(void)
+{
+ DT0 = (double) *((int32_t *)&FT1);
+}
+#endif
+
+void do_fabss(void)
{
FT0 = fabsf(FT1);
}
-void OPPROTO do_fsqrts(void)
+void do_fsqrts(void)
{
FT0 = sqrtf(FT1);
}
-void OPPROTO do_fsqrtd(void)
+void do_fsqrtd(void)
{
DT0 = sqrt(DT1);
}
-void OPPROTO do_fcmps (void)
+void do_fcmps (void)
{
if (isnan(FT0) || isnan(FT1)) {
T0 = FSR_FCC1 | FSR_FCC0;
@@ -31,7 +43,7 @@ void OPPROTO do_fcmps (void)
env->fsr = T0;
}
-void OPPROTO do_fcmpd (void)
+void do_fcmpd (void)
{
if (isnan(DT0) || isnan(DT1)) {
T0 = FSR_FCC1 | FSR_FCC0;
@@ -45,7 +57,7 @@ void OPPROTO do_fcmpd (void)
env->fsr = T0;
}
-void OPPROTO helper_ld_asi(int asi, int size, int sign)
+void helper_ld_asi(int asi, int size, int sign)
{
switch(asi) {
case 3: /* MMU probe */
@@ -76,7 +88,7 @@ void OPPROTO helper_ld_asi(int asi, int size, int sign)
}
}
-void OPPROTO helper_st_asi(int asi, int size, int sign)
+void helper_st_asi(int asi, int size, int sign)
{
switch(asi) {
case 3: /* MMU flush */
@@ -125,7 +137,7 @@ void do_ldd_kernel(uint32_t addr)
#endif
#endif
-void OPPROTO helper_rett()
+void helper_rett()
{
int cwp;
env->psret = 1;