qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Bryce Lanham <blanham@gmail.com>
To: qemu-devel@nongnu.org
Cc: Laurent Vivier <laurent@vivier.eu>
Subject: [Qemu-devel] [PATCH 089/111] m68k: add ftentox instruction
Date: Wed, 17 Aug 2011 15:53:05 -0500	[thread overview]
Message-ID: <1313614385-29324-1-git-send-email-blanham@gmail.com> (raw)

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

                 reply	other threads:[~2011-08-17 20:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1313614385-29324-1-git-send-email-blanham@gmail.com \
    --to=blanham@gmail.com \
    --cc=laurent@vivier.eu \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).