From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LrfcS-0004Df-No for qemu-devel@nongnu.org; Wed, 08 Apr 2009 17:47:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LrfcQ-0004D4-DN for qemu-devel@nongnu.org; Wed, 08 Apr 2009 17:47:39 -0400 Received: from [199.232.76.173] (port=51475 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LrfcQ-0004Cz-8J for qemu-devel@nongnu.org; Wed, 08 Apr 2009 17:47:38 -0400 Received: from savannah.gnu.org ([199.232.41.3]:40107 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 1LrfcP-0003o3-Sa for qemu-devel@nongnu.org; Wed, 08 Apr 2009 17:47:38 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1LrfcP-0002bW-2h for qemu-devel@nongnu.org; Wed, 08 Apr 2009 21:47:37 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1LrfcO-0002ae-9G for qemu-devel@nongnu.org; Wed, 08 Apr 2009 21:47:36 +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: Wed, 08 Apr 2009 21:47:36 +0000 Subject: [Qemu-devel] [7040] target-mips: optimize gen_cp0() 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: 7040 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7040 Author: aurel32 Date: 2009-04-08 21:47:35 +0000 (Wed, 08 Apr 2009) Log Message: ----------- target-mips: optimize gen_cp0() Signed-off-by: Aurelien Jarno Modified Paths: -------------- trunk/target-mips/translate.c Modified: trunk/target-mips/translate.c =================================================================== --- trunk/target-mips/translate.c 2009-04-08 21:29:37 UTC (rev 7039) +++ trunk/target-mips/translate.c 2009-04-08 21:47:35 UTC (rev 7040) @@ -3484,8 +3484,6 @@ default: goto die; } - /* Stop translation as we may have switched the execution mode */ - ctx->bstate = BS_STOP; break; case 10: switch (sel) { @@ -3507,8 +3505,6 @@ default: goto die; } - /* Stop translation as we may have switched the execution mode */ - ctx->bstate = BS_STOP; break; case 12: switch (sel) { @@ -3553,8 +3549,6 @@ default: goto die; } - /* Stop translation as we may have switched the execution mode */ - ctx->bstate = BS_STOP; break; case 14: switch (sel) { @@ -4756,7 +4750,7 @@ ctx->bstate = BS_STOP; break; case 1: - /* ignored */ + /* ignored, read only */ rn = "Config1"; break; case 2: @@ -5350,21 +5344,14 @@ /* Treat as NOP. */ return; } - { - TCGv t0 = tcg_temp_local_new(); - - gen_mfc0(env, ctx, t0, rd, ctx->opcode & 0x7); - gen_store_gpr(t0, rt); - tcg_temp_free(t0); - } + gen_mfc0(env, ctx, cpu_gpr[rt], rd, ctx->opcode & 0x7); opn = "mfc0"; break; case OPC_MTC0: { - TCGv t0 = tcg_temp_local_new(); + TCGv t0 = tcg_temp_new(); gen_load_gpr(t0, rt); - save_cpu_state(ctx, 1); gen_mtc0(env, ctx, t0, rd, ctx->opcode & 0x7); tcg_temp_free(t0); } @@ -5377,22 +5364,15 @@ /* Treat as NOP. */ return; } - { - TCGv t0 = tcg_temp_local_new(); - - gen_dmfc0(env, ctx, t0, rd, ctx->opcode & 0x7); - gen_store_gpr(t0, rt); - tcg_temp_free(t0); - } + gen_dmfc0(env, ctx, cpu_gpr[rt], rd, ctx->opcode & 0x7); opn = "dmfc0"; break; case OPC_DMTC0: check_insn(env, ctx, ISA_MIPS3); { - TCGv t0 = tcg_temp_local_new(); + TCGv t0 = tcg_temp_new(); gen_load_gpr(t0, rt); - save_cpu_state(ctx, 1); gen_dmtc0(env, ctx, t0, rd, ctx->opcode & 0x7); tcg_temp_free(t0); } @@ -5442,7 +5422,6 @@ case OPC_ERET: opn = "eret"; check_insn(env, ctx, ISA_MIPS2); - save_cpu_state(ctx, 1); gen_helper_eret(); ctx->bstate = BS_EXCP; break; @@ -5453,7 +5432,6 @@ MIPS_INVAL(opn); generate_exception(ctx, EXCP_RI); } else { - save_cpu_state(ctx, 1); gen_helper_deret(); ctx->bstate = BS_EXCP; }