aboutsummaryrefslogtreecommitdiff
path: root/target-sh4/op_helper.c
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-14 21:02:59 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-14 21:02:59 +0000
commit5b7141a11e2ef24caf26af95e59b2ed9552daa0e (patch)
tree77f69acdae3f1e64f727a4117066931928e22ce2 /target-sh4/op_helper.c
parent1b6e5f990641796dc7c370e297a60bfcdb6ca62d (diff)
downloadqemu-5b7141a11e2ef24caf26af95e59b2ed9552daa0e.zip
qemu-5b7141a11e2ef24caf26af95e59b2ed9552daa0e.tar.gz
qemu-5b7141a11e2ef24caf26af95e59b2ed9552daa0e.tar.bz2
sh4: Add FMAC instruction support
Signed-off-by: Laurent Desnogues <laurent.desnogues@gmail.com> Signed-off-by: Lionel Landwerlin <lionel.landwerlin@openwide.fr> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6309 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sh4/op_helper.c')
-rw-r--r--target-sh4/op_helper.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/target-sh4/op_helper.c b/target-sh4/op_helper.c
index aa81d9e..84e1ad3 100644
--- a/target-sh4/op_helper.c
+++ b/target-sh4/op_helper.c
@@ -531,6 +531,17 @@ uint64_t helper_float_DT(uint32_t t0)
return d.ll;
}
+uint32_t helper_fmac_FT(uint32_t t0, uint32_t t1, uint32_t t2)
+{
+ CPU_FloatU f0, f1, f2;
+ f0.l = t0;
+ f1.l = t1;
+ f2.l = t2;
+ f0.f = float32_mul(f0.f, f1.f, &env->fp_status);
+ f0.f = float32_add(f0.f, f2.f, &env->fp_status);
+ return f0.l;
+}
+
uint32_t helper_fmul_FT(uint32_t t0, uint32_t t1)
{
CPU_FloatU f0, f1;