Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KCAo4-0008Uu-Sy for qemu-devel@nongnu.org; Fri, 27 Jun 2008 06:03:53 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KCAo3-0008UE-Py for qemu-devel@nongnu.org; Fri, 27 Jun 2008 06:03:52 -0400 Received: from [199.232.76.173] (port=42577 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KCAo3-0008U6-Jv for qemu-devel@nongnu.org; Fri, 27 Jun 2008 06:03:51 -0400 Received: from savannah.gnu.org ([199.232.41.3]:51852 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 1KCAo0-00051G-Ov for qemu-devel@nongnu.org; Fri, 27 Jun 2008 06:03:51 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KCAnu-0002mM-N5 for qemu-devel@nongnu.org; Fri, 27 Jun 2008 10:03:42 +0000 Received: from ths by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KCAnu-0002mH-FK for qemu-devel@nongnu.org; Fri, 27 Jun 2008 10:03:42 +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: Fri, 27 Jun 2008 10:03:42 +0000 Subject: [Qemu-devel] [4795] Avoid unused input arguments which triggered tcg errors. 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: 4795 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4795 Author: ths Date: 2008-06-27 10:03:42 +0000 (Fri, 27 Jun 2008) Log Message: ----------- Avoid unused input arguments which triggered tcg errors. Spotted by Stefan Weil. 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-27 10:02:35 UTC (rev 4794) +++ trunk/target-mips/helper.h 2008-06-27 10:03:42 UTC (rev 4795) @@ -239,14 +239,14 @@ #undef FOP_PROTO /* Special functions */ -DEF_HELPER(target_ulong, do_di, (target_ulong t0)) -DEF_HELPER(target_ulong, do_ei, (target_ulong t0)) +DEF_HELPER(target_ulong, do_di, (void)) +DEF_HELPER(target_ulong, do_ei, (void)) DEF_HELPER(void, do_eret, (void)) DEF_HELPER(void, do_deret, (void)) -DEF_HELPER(target_ulong, do_rdhwr_cpunum, (target_ulong t0)) -DEF_HELPER(target_ulong, do_rdhwr_synci_step, (target_ulong t0)) -DEF_HELPER(target_ulong, do_rdhwr_cc, (target_ulong t0)) -DEF_HELPER(target_ulong, do_rdhwr_ccres, (target_ulong t0)) +DEF_HELPER(target_ulong, do_rdhwr_cpunum, (void)) +DEF_HELPER(target_ulong, do_rdhwr_synci_step, (void)) +DEF_HELPER(target_ulong, do_rdhwr_cc, (void)) +DEF_HELPER(target_ulong, do_rdhwr_ccres, (void)) DEF_HELPER(void, do_pmon, (int function)) DEF_HELPER(void, do_wait, (void)) Modified: trunk/target-mips/op_helper.c =================================================================== --- trunk/target-mips/op_helper.c 2008-06-27 10:02:35 UTC (rev 4794) +++ trunk/target-mips/op_helper.c 2008-06-27 10:03:42 UTC (rev 4795) @@ -1746,18 +1746,20 @@ #endif /* !CONFIG_USER_ONLY */ /* Specials */ -target_ulong do_di (target_ulong t0) +target_ulong do_di (void) { - t0 = env->CP0_Status; + target_ulong t0 = env->CP0_Status; + env->CP0_Status = t0 & ~(1 << CP0St_IE); cpu_mips_update_irq(env); return t0; } -target_ulong do_ei (target_ulong t0) +target_ulong do_ei (void) { - t0 = env->CP0_Status; + target_ulong t0 = env->CP0_Status; + env->CP0_Status = t0 | (1 << CP0St_IE); cpu_mips_update_irq(env); @@ -1820,48 +1822,48 @@ env->CP0_LLAddr = 1; } -target_ulong do_rdhwr_cpunum(target_ulong t0) +target_ulong do_rdhwr_cpunum(void) { if ((env->hflags & MIPS_HFLAG_CP0) || (env->CP0_HWREna & (1 << 0))) - t0 = env->CP0_EBase & 0x3ff; + return env->CP0_EBase & 0x3ff; else do_raise_exception(EXCP_RI); - return t0; + return 0; } -target_ulong do_rdhwr_synci_step(target_ulong t0) +target_ulong do_rdhwr_synci_step(void) { if ((env->hflags & MIPS_HFLAG_CP0) || (env->CP0_HWREna & (1 << 1))) - t0 = env->SYNCI_Step; + return env->SYNCI_Step; else do_raise_exception(EXCP_RI); - return t0; + return 0; } -target_ulong do_rdhwr_cc(target_ulong t0) +target_ulong do_rdhwr_cc(void) { if ((env->hflags & MIPS_HFLAG_CP0) || (env->CP0_HWREna & (1 << 2))) - t0 = env->CP0_Count; + return env->CP0_Count; else do_raise_exception(EXCP_RI); - return t0; + return 0; } -target_ulong do_rdhwr_ccres(target_ulong t0) +target_ulong do_rdhwr_ccres(void) { if ((env->hflags & MIPS_HFLAG_CP0) || (env->CP0_HWREna & (1 << 3))) - t0 = env->CCRes; + return env->CCRes; else do_raise_exception(EXCP_RI); - return t0; + return 0; } /* Bitfield operations. */ Modified: trunk/target-mips/translate.c =================================================================== --- trunk/target-mips/translate.c 2008-06-27 10:02:35 UTC (rev 4794) +++ trunk/target-mips/translate.c 2008-06-27 10:03:42 UTC (rev 4795) @@ -7386,19 +7386,19 @@ switch (rd) { case 0: save_cpu_state(ctx, 1); - tcg_gen_helper_1_1(do_rdhwr_cpunum, t0, t0); + tcg_gen_helper_1_0(do_rdhwr_cpunum, t0); break; case 1: save_cpu_state(ctx, 1); - tcg_gen_helper_1_1(do_rdhwr_synci_step, t0, t0); + tcg_gen_helper_1_0(do_rdhwr_synci_step, t0); break; case 2: save_cpu_state(ctx, 1); - tcg_gen_helper_1_1(do_rdhwr_cc, t0, t0); + tcg_gen_helper_1_0(do_rdhwr_cc, t0); break; case 3: save_cpu_state(ctx, 1); - tcg_gen_helper_1_1(do_rdhwr_ccres, t0, t0); + tcg_gen_helper_1_0(do_rdhwr_ccres, t0); break; case 29: #if defined (CONFIG_USER_ONLY) @@ -7548,14 +7548,14 @@ case OPC_DI: check_insn(env, ctx, ISA_MIPS32R2); save_cpu_state(ctx, 1); - tcg_gen_helper_1_1(do_di, t0, t0); + tcg_gen_helper_1_0(do_di, t0); /* Stop translation as we may have switched the execution mode */ ctx->bstate = BS_STOP; break; case OPC_EI: check_insn(env, ctx, ISA_MIPS32R2); save_cpu_state(ctx, 1); - tcg_gen_helper_1_1(do_ei, t0, t0); + tcg_gen_helper_1_0(do_ei, t0); /* Stop translation as we may have switched the execution mode */ ctx->bstate = BS_STOP; break;