From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KzrW7-0008Bw-8j for qemu-devel@nongnu.org; Tue, 11 Nov 2008 06:34:43 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KzrW5-0008Az-RT for qemu-devel@nongnu.org; Tue, 11 Nov 2008 06:34:42 -0500 Received: from [199.232.76.173] (port=52656 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KzrW5-0008Aq-K6 for qemu-devel@nongnu.org; Tue, 11 Nov 2008 06:34:41 -0500 Received: from savannah.gnu.org ([199.232.41.3]:43892 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 1KzrW5-0004LB-1j for qemu-devel@nongnu.org; Tue, 11 Nov 2008 06:34:41 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KzrW3-0003Fi-IF for qemu-devel@nongnu.org; Tue, 11 Nov 2008 11:34:39 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KzrW3-0003Fe-8H for qemu-devel@nongnu.org; Tue, 11 Nov 2008 11:34:39 +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: Tue, 11 Nov 2008 11:34:39 +0000 Subject: [Qemu-devel] [5674] target-mips: fix mft* helpers/call 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: 5674 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5674 Author: aurel32 Date: 2008-11-11 11:34:39 +0000 (Tue, 11 Nov 2008) Log Message: ----------- target-mips: fix mft* helpers/call This patch attempts to fix mft* helpers and the associated TCG calls. mft* helpers do not take a register in argument, however: - some helpers are called with an argument while they do not take one. - some helpers are declared with an argument they don't use. Acked-by: Thiemo Seufer Signed-off-by: Aurelien Jarno 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-11-11 11:34:30 UTC (rev 5673) +++ trunk/target-mips/helper.h 2008-11-11 11:34:39 UTC (rev 5674) @@ -137,11 +137,11 @@ DEF_HELPER(void, do_mtc0_datahi, (target_ulong t0)) /* MIPS MT functions */ -DEF_HELPER(target_ulong, do_mftgpr, (target_ulong t0, uint32_t sel)) -DEF_HELPER(target_ulong, do_mftlo, (target_ulong t0, uint32_t sel)) -DEF_HELPER(target_ulong, do_mfthi, (target_ulong t0, uint32_t sel)) -DEF_HELPER(target_ulong, do_mftacx, (target_ulong t0, uint32_t sel)) -DEF_HELPER(target_ulong, do_mftdsp, (target_ulong t0)) +DEF_HELPER(target_ulong, do_mftgpr, (uint32_t sel)) +DEF_HELPER(target_ulong, do_mftlo, (uint32_t sel)) +DEF_HELPER(target_ulong, do_mfthi, (uint32_t sel)) +DEF_HELPER(target_ulong, do_mftacx, (uint32_t sel)) +DEF_HELPER(target_ulong, do_mftdsp, (void)) DEF_HELPER(void, do_mttgpr, (target_ulong t0, uint32_t sel)) DEF_HELPER(void, do_mttlo, (target_ulong t0, uint32_t sel)) DEF_HELPER(void, do_mtthi, (target_ulong t0, uint32_t sel)) Modified: trunk/target-mips/op_helper.c =================================================================== --- trunk/target-mips/op_helper.c 2008-11-11 11:34:30 UTC (rev 5673) +++ trunk/target-mips/op_helper.c 2008-11-11 11:34:39 UTC (rev 5674) @@ -1358,7 +1358,7 @@ #endif /* !CONFIG_USER_ONLY */ /* MIPS MT functions */ -target_ulong do_mftgpr(target_ulong t0, uint32_t sel) +target_ulong do_mftgpr(uint32_t sel) { int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); @@ -1368,7 +1368,7 @@ return env->tcs[other_tc].gpr[sel]; } -target_ulong do_mftlo(target_ulong t0, uint32_t sel) +target_ulong do_mftlo(uint32_t sel) { int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); @@ -1378,7 +1378,7 @@ return env->tcs[other_tc].LO[sel]; } -target_ulong do_mfthi(target_ulong t0, uint32_t sel) +target_ulong do_mfthi(uint32_t sel) { int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); @@ -1388,7 +1388,7 @@ return env->tcs[other_tc].HI[sel]; } -target_ulong do_mftacx(target_ulong t0, uint32_t sel) +target_ulong do_mftacx(uint32_t sel) { int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); @@ -1398,7 +1398,7 @@ return env->tcs[other_tc].ACX[sel]; } -target_ulong do_mftdsp(target_ulong t0) +target_ulong do_mftdsp(void) { int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); Modified: trunk/target-mips/translate.c =================================================================== --- trunk/target-mips/translate.c 2008-11-11 11:34:30 UTC (rev 5673) +++ trunk/target-mips/translate.c 2008-11-11 11:34:39 UTC (rev 5674) @@ -5179,25 +5179,25 @@ case 2: switch (sel) { case 1: - tcg_gen_helper_1_1(do_mftc0_tcstatus, t0, t0); + tcg_gen_helper_1_0(do_mftc0_tcstatus, t0); break; case 2: - tcg_gen_helper_1_1(do_mftc0_tcbind, t0, t0); + tcg_gen_helper_1_0(do_mftc0_tcbind, t0); break; case 3: - tcg_gen_helper_1_1(do_mftc0_tcrestart, t0, t0); + tcg_gen_helper_1_0(do_mftc0_tcrestart, t0); break; case 4: - tcg_gen_helper_1_1(do_mftc0_tchalt, t0, t0); + tcg_gen_helper_1_0(do_mftc0_tchalt, t0); break; case 5: - tcg_gen_helper_1_1(do_mftc0_tccontext, t0, t0); + tcg_gen_helper_1_0(do_mftc0_tccontext, t0); break; case 6: - tcg_gen_helper_1_1(do_mftc0_tcschedule, t0, t0); + tcg_gen_helper_1_0(do_mftc0_tcschedule, t0); break; case 7: - tcg_gen_helper_1_1(do_mftc0_tcschefback, t0, t0); + tcg_gen_helper_1_0(do_mftc0_tcschefback, t0); break; default: gen_mfc0(env, ctx, t0, rt, sel); @@ -5207,7 +5207,7 @@ case 10: switch (sel) { case 0: - tcg_gen_helper_1_1(do_mftc0_entryhi, t0, t0); + tcg_gen_helper_1_0(do_mftc0_entryhi, t0); break; default: gen_mfc0(env, ctx, t0, rt, sel); @@ -5216,7 +5216,7 @@ case 12: switch (sel) { case 0: - tcg_gen_helper_1_1(do_mftc0_status, t0, t0); + tcg_gen_helper_1_0(do_mftc0_status, t0); break; default: gen_mfc0(env, ctx, t0, rt, sel); @@ -5225,7 +5225,7 @@ case 23: switch (sel) { case 0: - tcg_gen_helper_1_1(do_mftc0_debug, t0, t0); + tcg_gen_helper_1_0(do_mftc0_debug, t0); break; default: gen_mfc0(env, ctx, t0, rt, sel); @@ -5238,49 +5238,49 @@ } else switch (sel) { /* GPR registers. */ case 0: - tcg_gen_helper_1_1i(do_mftgpr, t0, t0, rt); + tcg_gen_helper_1_i(do_mftgpr, t0, rt); break; /* Auxiliary CPU registers */ case 1: switch (rt) { case 0: - tcg_gen_helper_1_1i(do_mftlo, t0, t0, 0); + tcg_gen_helper_1_i(do_mftlo, t0, 0); break; case 1: - tcg_gen_helper_1_1i(do_mfthi, t0, t0, 0); + tcg_gen_helper_1_i(do_mfthi, t0, 0); break; case 2: - tcg_gen_helper_1_1i(do_mftacx, t0, t0, 0); + tcg_gen_helper_1_i(do_mftacx, t0, 0); break; case 4: - tcg_gen_helper_1_1i(do_mftlo, t0, t0, 1); + tcg_gen_helper_1_i(do_mftlo, t0, 1); break; case 5: - tcg_gen_helper_1_1i(do_mfthi, t0, t0, 1); + tcg_gen_helper_1_i(do_mfthi, t0, 1); break; case 6: - tcg_gen_helper_1_1i(do_mftacx, t0, t0, 1); + tcg_gen_helper_1_i(do_mftacx, t0, 1); break; case 8: - tcg_gen_helper_1_1i(do_mftlo, t0, t0, 2); + tcg_gen_helper_1_i(do_mftlo, t0, 2); break; case 9: - tcg_gen_helper_1_1i(do_mfthi, t0, t0, 2); + tcg_gen_helper_1_i(do_mfthi, t0, 2); break; case 10: - tcg_gen_helper_1_1i(do_mftacx, t0, t0, 2); + tcg_gen_helper_1_i(do_mftacx, t0, 2); break; case 12: - tcg_gen_helper_1_1i(do_mftlo, t0, t0, 3); + tcg_gen_helper_1_i(do_mftlo, t0, 3); break; case 13: - tcg_gen_helper_1_1i(do_mfthi, t0, t0, 3); + tcg_gen_helper_1_i(do_mfthi, t0, 3); break; case 14: - tcg_gen_helper_1_1i(do_mftacx, t0, t0, 3); + tcg_gen_helper_1_i(do_mftacx, t0, 3); break; case 16: - tcg_gen_helper_1_1(do_mftdsp, t0, t0); + tcg_gen_helper_1_0(do_mftdsp, t0); break; default: goto die;