[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 107/111] m68k: add flognp1 instruction
From: |
Bryce Lanham |
Subject: |
[Qemu-devel] [PATCH 107/111] m68k: add flognp1 instruction |
Date: |
Wed, 17 Aug 2011 15:54:12 -0500 |
From: Laurent Vivier <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>
---
target-m68k/helper.c | 13 +++++++++++++
target-m68k/helpers.h | 1 +
target-m68k/translate.c | 3 +++
3 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/target-m68k/helper.c b/target-m68k/helper.c
index 9269b48..f9a35d5 100644
--- a/target-m68k/helper.c
+++ b/target-m68k/helper.c
@@ -1374,6 +1374,19 @@ void HELPER(sqrt_FP0)(CPUState *env)
floatx80_to_FP0(env, res);
}
+void HELPER(lognp1_FP0)(CPUState *env)
+{
+ floatx80 val;
+ long double res;
+
+ val = FP0_to_floatx80(env);
+ DBG_FPUH("lognp1_FP0 %Lg", floatx80_to_ldouble(val));
+ res = logl(floatx80_to_ldouble(val) + 1.0);
+ DBG_FPU(" = %Lg\n", res);
+
+ floatx80_to_FP0(env, ldouble_to_floatx80(res));
+}
+
void HELPER(ln_FP0)(CPUState *env)
{
floatx80 val;
diff --git a/target-m68k/helpers.h b/target-m68k/helpers.h
index 3c8fc60..c043c54 100644
--- a/target-m68k/helpers.h
+++ b/target-m68k/helpers.h
@@ -66,6 +66,7 @@ DEF_HELPER_1(iround_FP0, void, env)
DEF_HELPER_1(sinh_FP0, void, env)
DEF_HELPER_1(itrunc_FP0, void, env)
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(sin_FP0, void, env)
diff --git a/target-m68k/translate.c b/target-m68k/translate.c
index 26ab027..f4f10f4 100644
--- a/target-m68k/translate.c
+++ b/target-m68k/translate.c
@@ -3737,6 +3737,9 @@ DISAS_INSN(fpu)
case 4: case 0x41: case 0x45: /* fsqrt */
gen_helper_sqrt_FP0(cpu_env);
break;
+ case 6: /* flognp1 */
+ gen_helper_lognp1_FP0(cpu_env);
+ break;
case 0x09: /* ftanh */
gen_helper_tanh_FP0(cpu_env);
break;
--
1.7.2.3
- [Qemu-devel] [PATCH 100/111] m68k: use log10l() to compute log10_FP0(), Bryce Lanham, 2011/08/17
- [Qemu-devel] [PATCH 104/111] m68k: add fsincos instruction, Bryce Lanham, 2011/08/17
- [Qemu-devel] [PATCH 106/111] m68k: add ftanh instruction, Bryce Lanham, 2011/08/17
- [Qemu-devel] [PATCH 111/111] m68k: move from sr can use effective addresse on m68k, Bryce Lanham, 2011/08/17
- [Qemu-devel] [PATCH 109/111] m68k: first draft of q800 emulation (not working), Bryce Lanham, 2011/08/17
- [Qemu-devel] [PATCH 107/111] m68k: add flognp1 instruction,
Bryce Lanham <=
- [Qemu-devel] [PATCH 108/111] m68k: add fatanh instruction, Bryce Lanham, 2011/08/17
- [Qemu-devel] [PATCH 102/111] m68k: add fcosh instruction, Bryce Lanham, 2011/08/17
- [Qemu-devel] [PATCH 110/111] m68k: add movec instruction, Bryce Lanham, 2011/08/17
- [Qemu-devel] [PATCH 103/111] m68k: add fasin instruction, Bryce Lanham, 2011/08/17
- [Qemu-devel] [PATCH 101/111] m68k: correctly load signed word into floating point register, Bryce Lanham, 2011/08/17
- [Qemu-devel] [PATCH 105/111] m68k: add fsinh instruction, Bryce Lanham, 2011/08/17