* [Qemu-devel] [PATCH 089/111] m68k: add ftentox instruction
@ 2011-08-17 20:53 Bryce Lanham
0 siblings, 0 replies; only message in thread
From: Bryce Lanham @ 2011-08-17 20:53 UTC (permalink / raw)
To: qemu-devel; +Cc: Laurent Vivier
From: Laurent Vivier <laurent@vivier.eu>
allow gnome-background-properties to run
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
target-m68k/helper.c | 15 +++++++++++++++
target-m68k/helpers.h | 1 +
target-m68k/translate.c | 3 +++
3 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/target-m68k/helper.c b/target-m68k/helper.c
index 6cc4202..533f33b 100644
--- a/target-m68k/helper.c
+++ b/target-m68k/helper.c
@@ -1411,6 +1411,21 @@ void HELPER(exp2_FP0)(CPUState *env)
floatx80_to_FP0(env, float32_to_floatx80(res, &env->fp_status));
}
+void HELPER(exp10_FP0)(CPUState *env)
+{
+ floatx80 res;
+ long double val;
+
+ res = FP0_to_floatx80(env);
+ val = LDOUBLE(res);
+
+ DBG_FPUH("exp2_FP0 %Lg", val);
+ val = exp10l(val);
+ DBG_FPU(" = %Lg", val);
+ res = FLOATx80(val);
+ floatx80_to_FP0(env, res);
+}
+
void HELPER(abs_FP0)(CPUState *env)
{
floatx80 res;
diff --git a/target-m68k/helpers.h b/target-m68k/helpers.h
index 46e71d2..88a047b 100644
--- a/target-m68k/helpers.h
+++ b/target-m68k/helpers.h
@@ -70,6 +70,7 @@ DEF_HELPER_1(sin_FP0, void, env)
DEF_HELPER_1(tan_FP0, void, env)
DEF_HELPER_1(exp_FP0, void, env)
DEF_HELPER_1(exp2_FP0, void, env)
+DEF_HELPER_1(exp10_FP0, void, env)
DEF_HELPER_1(ln_FP0, void, env)
DEF_HELPER_1(log10_FP0, void, env)
DEF_HELPER_1(abs_FP0, void, env)
diff --git a/target-m68k/translate.c b/target-m68k/translate.c
index 52df274..70eba1a 100644
--- a/target-m68k/translate.c
+++ b/target-m68k/translate.c
@@ -3704,6 +3704,9 @@ DISAS_INSN(fpu)
case 0x11: /* ftwotox */
gen_helper_exp2_FP0(cpu_env);
break;
+ case 0x12: /* ftentox */
+ gen_helper_exp10_FP0(cpu_env);
+ break;
case 0x14: /* flogn */
gen_helper_ln_FP0(cpu_env);
break;
--
1.7.2.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-08-17 20:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-17 20:53 [Qemu-devel] [PATCH 089/111] m68k: add ftentox instruction Bryce Lanham
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).