From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KCyHD-0000sL-QD for qemu-devel@nongnu.org; Sun, 29 Jun 2008 10:53:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KCyHD-0000rx-AL for qemu-devel@nongnu.org; Sun, 29 Jun 2008 10:53:15 -0400 Received: from [199.232.76.173] (port=40686 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KCyHC-0000ro-Uu for qemu-devel@nongnu.org; Sun, 29 Jun 2008 10:53:15 -0400 Received: from savannah.gnu.org ([199.232.41.3]:50480 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 1KCyHC-0000LO-GD for qemu-devel@nongnu.org; Sun, 29 Jun 2008 10:53:14 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KCyHB-0007TK-Aj for qemu-devel@nongnu.org; Sun, 29 Jun 2008 14:53:13 +0000 Received: from ths by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KCyHA-0007T7-K6 for qemu-devel@nongnu.org; Sun, 29 Jun 2008 14:53:13 +0000 MIME-Version: 1.0 Errors-To: ths Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Thiemo Seufer Message-Id: Date: Sun, 29 Jun 2008 14:53:12 +0000 Subject: [Qemu-devel] [4802] Remove unnecessary helper arguments, and fix some typos. 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: 4802 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4802 Author: ths Date: 2008-06-29 14:53:11 +0000 (Sun, 29 Jun 2008) Log Message: ----------- Remove unnecessary helper arguments, and fix some typos. Modified Paths: -------------- trunk/target-mips/helper.h trunk/target-mips/op_helper.c trunk/target-mips/translate.c Modified: trunk/target-mips/helper.h =================================================================== --- trunk/target-mips/helper.h 2008-06-29 12:29:56 UTC (rev 4801) +++ trunk/target-mips/helper.h 2008-06-29 14:53:11 UTC (rev 4802) @@ -251,12 +251,12 @@ DEF_HELPER(void, do_wait, (void)) /* Bitfield operations. */ -DEF_HELPER(target_ulong, do_ext, (target_ulong t0, target_ulong t1, uint32_t pos, uint32_t size)) +DEF_HELPER(target_ulong, do_ext, (target_ulong t1, uint32_t pos, uint32_t size)) DEF_HELPER(target_ulong, do_ins, (target_ulong t0, target_ulong t1, uint32_t pos, uint32_t size)) -DEF_HELPER(target_ulong, do_wsbh, (target_ulong t0, target_ulong t1)) +DEF_HELPER(target_ulong, do_wsbh, (target_ulong t1)) #ifdef TARGET_MIPS64 -DEF_HELPER(target_ulong, do_dext, (target_ulong t0, target_ulong t1, uint32_t pos, uint32_t size)) +DEF_HELPER(target_ulong, do_dext, (target_ulong t1, uint32_t pos, uint32_t size)) DEF_HELPER(target_ulong, do_dins, (target_ulong t0, target_ulong t1, uint32_t pos, uint32_t size)) -DEF_HELPER(target_ulong, do_dsbh, (target_ulong t0, target_ulong t1)) -DEF_HELPER(target_ulong, do_dshd, (target_ulong t0, target_ulong t1)) +DEF_HELPER(target_ulong, do_dsbh, (target_ulong t1)) +DEF_HELPER(target_ulong, do_dshd, (target_ulong t1)) #endif Modified: trunk/target-mips/op_helper.c =================================================================== --- trunk/target-mips/op_helper.c 2008-06-29 12:29:56 UTC (rev 4801) +++ trunk/target-mips/op_helper.c 2008-06-29 14:53:11 UTC (rev 4802) @@ -1867,7 +1867,7 @@ } /* Bitfield operations. */ -target_ulong do_ext(target_ulong t0, target_ulong t1, uint32_t pos, uint32_t size) +target_ulong do_ext(target_ulong t1, uint32_t pos, uint32_t size) { return (int32_t)((t1 >> pos) & ((size < 32) ? ((1 << size) - 1) : ~0)); } @@ -1879,13 +1879,13 @@ return (int32_t)((t0 & ~mask) | ((t1 << pos) & mask)); } -target_ulong do_wsbh(target_ulong t0, target_ulong t1) +target_ulong do_wsbh(target_ulong t1) { return (int32_t)(((t1 << 8) & ~0x00FF00FF) | ((t1 >> 8) & 0x00FF00FF)); } #if defined(TARGET_MIPS64) -target_ulong do_dext(target_ulong t0, target_ulong t1, uint32_t pos, uint32_t size) +target_ulong do_dext(target_ulong t1, uint32_t pos, uint32_t size) { return (t1 >> pos) & ((size < 64) ? ((1ULL << size) - 1) : ~0ULL); } @@ -1897,12 +1897,12 @@ return (t0 & ~mask) | ((t1 << pos) & mask); } -target_ulong do_dsbh(target_ulong t0, target_ulong t1) +target_ulong do_dsbh(target_ulong t1) { return ((t1 << 8) & ~0x00FF00FF00FF00FFULL) | ((t1 >> 8) & 0x00FF00FF00FF00FFULL); } -target_ulong do_dshd(target_ulong t0, target_ulong t1) +target_ulong do_dshd(target_ulong t1) { t1 = ((t1 << 16) & ~0x0000FFFF0000FFFFULL) | ((t1 >> 16) & 0x0000FFFF0000FFFFULL); return (t1 << 32) | (t1 >> 32); Modified: trunk/target-mips/translate.c =================================================================== --- trunk/target-mips/translate.c 2008-06-29 12:29:56 UTC (rev 4801) +++ trunk/target-mips/translate.c 2008-06-29 14:53:11 UTC (rev 4802) @@ -464,12 +464,12 @@ tcg_temp_free(tmp); } -static inline void tcg_gen_helper_0_2ii(void *func, TCGv arg1, TCGv arg2, TCGv arg3, TCGv arg4) +static inline void tcg_gen_helper_0_1ii(void *func, TCGv arg1, TCGv arg2, TCGv arg3) { - TCGv tmp1 = tcg_const_i32(arg3); + TCGv tmp1 = tcg_const_i32(arg2); TCGv tmp2 = tcg_const_i32(arg3); - tcg_gen_helper_0_4(func, arg1, arg2, tmp1, tmp2); + tcg_gen_helper_0_3(func, arg1, tmp1, tmp2); tcg_temp_free(tmp1); tcg_temp_free(tmp2); } @@ -490,6 +490,16 @@ tcg_temp_free(tmp); } +static inline void tcg_gen_helper_1_1ii(void *func, TCGv ret, TCGv arg1, TCGv arg2, TCGv arg3) +{ + TCGv tmp1 = tcg_const_i32(arg2); + TCGv tmp2 = tcg_const_i32(arg3); + + tcg_gen_helper_1_3(func, ret, arg1, tmp1, tmp2); + tcg_temp_free(tmp1); + tcg_temp_free(tmp2); +} + static inline void tcg_gen_helper_1_2i(void *func, TCGv ret, TCGv arg1, TCGv arg2, TCGv arg3) { TCGv tmp = tcg_const_i32(arg3); @@ -501,7 +511,7 @@ static inline void tcg_gen_helper_1_2ii(void *func, TCGv ret, TCGv arg1, TCGv arg2, TCGv arg3, TCGv arg4) { TCGv tmp1 = tcg_const_i32(arg3); - TCGv tmp2 = tcg_const_i32(arg3); + TCGv tmp2 = tcg_const_i32(arg4); tcg_gen_helper_1_4(func, ret, arg1, arg2, tmp1, tmp2); tcg_temp_free(tmp1); @@ -2748,23 +2758,23 @@ case OPC_EXT: if (lsb + msb > 31) goto fail; - tcg_gen_helper_1_2ii(do_ext, t0, t0, t1, lsb, msb + 1); + tcg_gen_helper_1_1ii(do_ext, t0, t1, lsb, msb + 1); break; #if defined(TARGET_MIPS64) case OPC_DEXTM: if (lsb + msb > 63) goto fail; - tcg_gen_helper_1_2ii(do_dext, t0, t0, t1, lsb, msb + 1 + 32); + tcg_gen_helper_1_1ii(do_dext, t0, t1, lsb, msb + 1 + 32); break; case OPC_DEXTU: if (lsb + msb > 63) goto fail; - tcg_gen_helper_1_2ii(do_dext, t0, t0, t1, lsb + 32, msb + 1); + tcg_gen_helper_1_1ii(do_dext, t0, t1, lsb + 32, msb + 1); break; case OPC_DEXT: if (lsb + msb > 63) goto fail; - tcg_gen_helper_1_2ii(do_dext, t0, t0, t1, lsb, msb + 1); + tcg_gen_helper_1_1ii(do_dext, t0, t1, lsb, msb + 1); break; #endif case OPC_INS: @@ -7388,7 +7398,7 @@ switch (op2) { case OPC_WSBH: gen_load_gpr(t1, rt); - tcg_gen_helper_1_2(do_wsbh, t0, t0, t1); + tcg_gen_helper_1_1(do_wsbh, t0, t1); gen_store_gpr(t0, rd); break; case OPC_SEB: @@ -7490,11 +7500,11 @@ switch (op2) { case OPC_DSBH: gen_load_gpr(t1, rt); - tcg_gen_helper_1_2(do_dsbh, t0, t0, t1); + tcg_gen_helper_1_1(do_dsbh, t0, t1); break; case OPC_DSHD: gen_load_gpr(t1, rt); - tcg_gen_helper_1_2(do_dshd, t0, t0, t1); + tcg_gen_helper_1_1(do_dshd, t0, t1); break; default: /* Invalid */ MIPS_INVAL("dbshfl");