From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:51670) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qtn9n-0006qM-8E for qemu-devel@nongnu.org; Wed, 17 Aug 2011 16:56:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qtn8a-0007rU-4F for qemu-devel@nongnu.org; Wed, 17 Aug 2011 16:55:00 -0400 Received: from mail-yx0-f173.google.com ([209.85.213.173]:43166) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qtn8Z-0007qL-UN for qemu-devel@nongnu.org; Wed, 17 Aug 2011 16:54:56 -0400 Received: by yxt3 with SMTP id 3so1231202yxt.4 for ; Wed, 17 Aug 2011 13:54:40 -0700 (PDT) From: Bryce Lanham Date: Wed, 17 Aug 2011 15:54:10 -0500 Message-Id: <1313614456-29404-6-git-send-email-blanham@gmail.com> In-Reply-To: <1313614456-29404-1-git-send-email-blanham@gmail.com> References: <1313614456-29404-1-git-send-email-blanham@gmail.com> Subject: [Qemu-devel] [PATCH 105/111] m68k: add fsinh instruction List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Laurent Vivier From: Laurent Vivier Signed-off-by: Laurent Vivier --- 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 5d34901..fc1b560 100644 --- a/target-m68k/helper.c +++ b/target-m68k/helper.c @@ -1331,6 +1331,21 @@ void HELPER(iround_FP0)(CPUState *env) floatx80_to_FP0(env, res); } +void HELPER(sinh_FP0)(CPUState *env) +{ + floatx80 res; + long double val; + + res = FP0_to_floatx80(env); + val = floatx80_to_ldouble(res); + + DBG_FPUH("sinh_FP0 %Lg", val); + val = sinhl(val); + DBG_FPU(" = %Lg", val); + res = ldouble_to_floatx80(val); + floatx80_to_FP0(env, res); +} + void HELPER(itrunc_FP0)(CPUState *env) { floatx80 res; diff --git a/target-m68k/helpers.h b/target-m68k/helpers.h index 154c183..e77b9b7 100644 --- a/target-m68k/helpers.h +++ b/target-m68k/helpers.h @@ -63,6 +63,7 @@ DEF_HELPER_4(fmovem, void, env, i32, i32, i32) DEF_HELPER_2(set_fpcr, void, env, i32) DEF_HELPER_2(const_FP0, void, env, i32) 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(atan_FP0, void, env) diff --git a/target-m68k/translate.c b/target-m68k/translate.c index e714eb4..c43bfe8 100644 --- a/target-m68k/translate.c +++ b/target-m68k/translate.c @@ -3727,6 +3727,9 @@ DISAS_INSN(fpu) gen_helper_iround_FP0(cpu_env); round = 0; break; + case 2: /* fsinh */ + gen_helper_sinh_FP0(cpu_env); + break; case 3: /* fintrz */ gen_helper_itrunc_FP0(cpu_env); round = 0; -- 1.7.2.3