aboutsummaryrefslogtreecommitdiff
path: root/target-ppc/op_helper.c
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-23 16:30:50 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-23 16:30:50 +0000
commita0d7d5a776ff4f5cbc00d3d9bb43925e1acbefa1 (patch)
treeaa26218ab12dbd5f5250361358b6d75ed63c4f68 /target-ppc/op_helper.c
parenta7859e892bed8b6cbc3c4b6908af6e8884f1f7bc (diff)
target-ppc: convert FPU load/store to TCG
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5786 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc/op_helper.c')
-rw-r--r--target-ppc/op_helper.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c
index 6ea3ba3dae..fd36423854 100644
--- a/target-ppc/op_helper.c
+++ b/target-ppc/op_helper.c
@@ -237,6 +237,24 @@ target_ulong helper_popcntb_64 (target_ulong val)
/*****************************************************************************/
/* Floating point operations helpers */
+uint64_t helper_float32_to_float64(uint32_t arg)
+{
+ CPU_FloatU f;
+ CPU_DoubleU d;
+ f.l = arg;
+ d.d = float32_to_float64(f.f, &env->fp_status);
+ return d.ll;
+}
+
+uint32_t helper_float64_to_float32(uint64_t arg)
+{
+ CPU_FloatU f;
+ CPU_DoubleU d;
+ d.ll = arg;
+ f.f = float64_to_float32(d.d, &env->fp_status);
+ return f.l;
+}
+
static always_inline int fpisneg (float64 d)
{
CPU_DoubleU u;