Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KaHd3-0007BT-SR for qemu-devel@nongnu.org; Mon, 01 Sep 2008 18:12:09 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KaHd2-0007AY-El for qemu-devel@nongnu.org; Mon, 01 Sep 2008 18:12:09 -0400 Received: from [199.232.76.173] (port=52111 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KaHd2-0007A8-30 for qemu-devel@nongnu.org; Mon, 01 Sep 2008 18:12:08 -0400 Received: from savannah.gnu.org ([199.232.41.3]:37754 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KaHd1-00058t-Q1 for qemu-devel@nongnu.org; Mon, 01 Sep 2008 18:12:07 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KaHd1-0007bl-7H for qemu-devel@nongnu.org; Mon, 01 Sep 2008 22:12:07 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KaHd0-0007bS-MZ for qemu-devel@nongnu.org; Mon, 01 Sep 2008 22:12:07 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Mon, 01 Sep 2008 22:12:06 +0000 Subject: [Qemu-devel] [5125] SH4: final conversion to TCG Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 5125 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5125 Author: aurel32 Date: 2008-09-01 22:12:06 +0000 (Mon, 01 Sep 2008) Log Message: ----------- SH4: final conversion to TCG Signed-off-by: Aurelien Jarno Modified Paths: -------------- trunk/configure trunk/target-sh4/helper.h trunk/target-sh4/op_helper.c trunk/target-sh4/translate.c Removed Paths: ------------- trunk/target-sh4/op.c Modified: trunk/configure =================================================================== --- trunk/configure 2008-09-01 22:11:56 UTC (rev 5124) +++ trunk/configure 2008-09-01 22:12:06 UTC (rev 5125) @@ -1427,10 +1427,8 @@ ;; sh4|sh4eb) echo "TARGET_ARCH=sh4" >> $config_mak - echo "CONFIG_DYNGEN_OP=yes" >> $config_mak echo "#define TARGET_ARCH \"sh4\"" >> $config_h echo "#define TARGET_SH4 1" >> $config_h - echo "#define CONFIG_DYNGEN_OP 1" >> $config_h bflt="yes" ;; sparc) Modified: trunk/target-sh4/helper.h =================================================================== --- trunk/target-sh4/helper.h 2008-09-01 22:11:56 UTC (rev 5124) +++ trunk/target-sh4/helper.h 2008-09-01 22:12:06 UTC (rev 5125) @@ -37,6 +37,7 @@ DEF_HELPER(uint64_t, helper_float_DT, (uint32_t)) DEF_HELPER(uint32_t, helper_fmul_FT, (uint32_t, uint32_t)) DEF_HELPER(uint64_t, helper_fmul_DT, (uint64_t, uint64_t)) +DEF_HELPER(uint32_t, helper_fneg_T, (uint32_t)) DEF_HELPER(uint32_t, helper_fsub_FT, (uint32_t, uint32_t)) DEF_HELPER(uint64_t, helper_fsub_DT, (uint64_t, uint64_t)) DEF_HELPER(uint32_t, helper_fsqrt_FT, (uint32_t)) Deleted: trunk/target-sh4/op.c =================================================================== --- trunk/target-sh4/op.c 2008-09-01 22:11:56 UTC (rev 5124) +++ trunk/target-sh4/op.c 2008-09-01 22:12:06 UTC (rev 5125) @@ -1,27 +0,0 @@ -/* - * SH4 emulation - * - * Copyright (c) 2005 Samuel Tardieu - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include "exec.h" - -void OPPROTO op_fneg_frN(void) -{ - env->fregs[PARAM1] = float32_chs(env->fregs[PARAM1]); - RETURN(); -} - Modified: trunk/target-sh4/op_helper.c =================================================================== --- trunk/target-sh4/op_helper.c 2008-09-01 22:11:56 UTC (rev 5124) +++ trunk/target-sh4/op_helper.c 2008-09-01 22:12:06 UTC (rev 5125) @@ -489,6 +489,12 @@ return *(uint64_t*)(&ret); } +uint32_t helper_fneg_T(uint32_t t0) +{ + float32 ret = float32_chs(*(float32*)&t0); + return *(uint32_t*)(&ret); +} + uint32_t helper_fsqrt_FT(uint32_t t0) { float32 ret = float32_sqrt(*(float32*)&t0, &env->fp_status); Modified: trunk/target-sh4/translate.c =================================================================== --- trunk/target-sh4/translate.c 2008-09-01 22:11:56 UTC (rev 5124) +++ trunk/target-sh4/translate.c 2008-09-01 22:12:06 UTC (rev 5125) @@ -1593,7 +1593,13 @@ } return; case 0xf04d: /* fneg FRn/DRn - FPSCR: Nothing */ - gen_op_fneg_frN(FREG(B11_8)); + { + TCGv fp = tcg_temp_new(TCG_TYPE_I32); + gen_load_fpr32(fp, FREG(B11_8)); + tcg_gen_helper_1_1(helper_fneg_T, fp, fp); + gen_store_fpr32(fp, FREG(B11_8)); + tcg_temp_free(fp); + } return; case 0xf05d: /* fabs FRn/DRn */ if (ctx->fpscr & FPSCR_PR) {