From patchwork Wed Aug 17 20:53:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryce Lanham X-Patchwork-Id: 110353 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B4A97B6FA0 for ; Thu, 18 Aug 2011 06:53:23 +1000 (EST) Received: from localhost ([::1]:40310 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qtn70-0001uu-OQ for incoming@patchwork.ozlabs.org; Wed, 17 Aug 2011 16:53:18 -0400 Received: from eggs.gnu.org ([140.186.70.92]:51104) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qtn6v-0001ue-JA for qemu-devel@nongnu.org; Wed, 17 Aug 2011 16:53:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qtn6u-0007eD-Ds for qemu-devel@nongnu.org; Wed, 17 Aug 2011 16:53:13 -0400 Received: from mail-yx0-f173.google.com ([209.85.213.173]:48683) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qtn6u-0007cd-BI for qemu-devel@nongnu.org; Wed, 17 Aug 2011 16:53:12 -0400 Received: by mail-yx0-f173.google.com with SMTP id 3so1229870yxt.4 for ; Wed, 17 Aug 2011 13:53:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; bh=uaCAMvbQ1EqO3F4kKHc0Rf3BbiWC49HsBvQoyMU7b24=; b=HYRUSQU6eEVCvaBq8YZdNmPbiMxn/Pmi5KzPqQhceqakXZRZ01qpQEGQnM/e/SRorf cAgaSgwVOWtspwfUTXhJWD6Jg0I0n4imPNZVdNu6xlVtYATpNB9ZWpRk0EEg/E/KPy15 al4zilOoQUXf83XlRaOU2a/l2xKmaxy7OuJ8c= Received: by 10.91.82.5 with SMTP id j5mr1580832agl.150.1313614391996; Wed, 17 Aug 2011 13:53:11 -0700 (PDT) Received: from localhost.localdomain (betelgeuse.cs.uchicago.edu [128.135.24.226]) by mx.google.com with ESMTPS id g17sm1210703ank.36.2011.08.17.13.53.10 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 17 Aug 2011 13:53:11 -0700 (PDT) From: Bryce Lanham To: qemu-devel@nongnu.org Date: Wed, 17 Aug 2011 15:53:05 -0500 Message-Id: <1313614385-29324-1-git-send-email-blanham@gmail.com> X-Mailer: git-send-email 1.7.2.3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.213.173 Cc: Laurent Vivier Subject: [Qemu-devel] [PATCH 089/111] m68k: add ftentox instruction X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Laurent Vivier allow gnome-background-properties to run 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 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;