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 108/111] m68k: add fatanh instruction
Date: Wed, 17 Aug 2011 15:54:13 -0500	[thread overview]
Message-ID: <1313614456-29404-9-git-send-email-blanham@gmail.com> (raw)
In-Reply-To: <1313614456-29404-1-git-send-email-blanham@gmail.com>

From: Laurent Vivier <laurent@vivier.eu>

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 target-m68k/helper.c    |   15 +++++++++++++++
 target-m68k/helpers.h   |    1 +
 target-m68k/translate.c |    5 ++++-
 3 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/target-m68k/helper.c b/target-m68k/helper.c
index f9a35d5..93a178a 100644
--- a/target-m68k/helper.c
+++ b/target-m68k/helper.c
@@ -1443,6 +1443,21 @@ void HELPER(asin_FP0)(CPUState *env)
     floatx80_to_FP0(env, res);
 }
 
+void HELPER(atanh_FP0)(CPUState *env)
+{
+    floatx80 res;
+    long double val;
+
+    res = FP0_to_floatx80(env);
+    val = floatx80_to_ldouble(res);
+
+    DBG_FPUH("atanh_FP0 %Lg", val);
+    val = atanhl(val);
+    DBG_FPU(" = %Lg", val);
+    res = ldouble_to_floatx80(val);
+    floatx80_to_FP0(env, res);
+}
+
 void HELPER(sin_FP0)(CPUState *env)
 {
     floatx80 res;
diff --git a/target-m68k/helpers.h b/target-m68k/helpers.h
index c043c54..373660e 100644
--- a/target-m68k/helpers.h
+++ b/target-m68k/helpers.h
@@ -69,6 +69,7 @@ DEF_HELPER_1(sqrt_FP0, void, env)
 DEF_HELPER_1(lognp1_FP0, void, env)
 DEF_HELPER_1(atan_FP0, void, env)
 DEF_HELPER_1(asin_FP0, void, env)
+DEF_HELPER_1(atanh_FP0, void, env)
 DEF_HELPER_1(sin_FP0, void, env)
 DEF_HELPER_1(tanh_FP0, void, env)
 DEF_HELPER_1(tan_FP0, void, env)
diff --git a/target-m68k/translate.c b/target-m68k/translate.c
index f4f10f4..71cbffb 100644
--- a/target-m68k/translate.c
+++ b/target-m68k/translate.c
@@ -3746,9 +3746,12 @@ DISAS_INSN(fpu)
     case 0x0a:                       /* fatan */
         gen_helper_atan_FP0(cpu_env);
         break;
-    case 0x0c:
+    case 0x0c:                       /* fasin */
         gen_helper_asin_FP0(cpu_env);
         break;
+    case 0x0d:                       /* fatanh */
+        gen_helper_atanh_FP0(cpu_env);
+        break;
     case 0x0e:                       /* fsin */
         gen_helper_sin_FP0(cpu_env);
         break;
-- 
1.7.2.3

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

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-17 20:54 [Qemu-devel] [PATCH 100/111] m68k: use log10l() to compute log10_FP0() Bryce Lanham
2011-08-17 20:54 ` [Qemu-devel] [PATCH 101/111] m68k: correctly load signed word into floating point register Bryce Lanham
2011-08-17 20:54 ` [Qemu-devel] [PATCH 102/111] m68k: add fcosh instruction Bryce Lanham
2011-08-17 20:54 ` [Qemu-devel] [PATCH 103/111] m68k: add fasin instruction Bryce Lanham
2011-08-17 20:54 ` [Qemu-devel] [PATCH 104/111] m68k: add fsincos instruction Bryce Lanham
2011-08-17 20:54 ` [Qemu-devel] [PATCH 105/111] m68k: add fsinh instruction Bryce Lanham
2011-08-17 20:54 ` [Qemu-devel] [PATCH 106/111] m68k: add ftanh instruction Bryce Lanham
2011-08-17 20:54 ` [Qemu-devel] [PATCH 107/111] m68k: add flognp1 instruction Bryce Lanham
2011-08-17 20:54 ` Bryce Lanham [this message]
2011-08-17 20:54 ` [Qemu-devel] [PATCH 109/111] m68k: first draft of q800 emulation (not working) Bryce Lanham
2011-08-17 20:54 ` [Qemu-devel] [PATCH 110/111] m68k: add movec instruction Bryce Lanham
2011-08-17 20:54 ` [Qemu-devel] [PATCH 111/111] m68k: move from sr can use effective addresse on m68k Bryce Lanham

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=1313614456-29404-9-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).