From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JnWqq-0001ln-Hx for qemu-devel@nongnu.org; Sun, 20 Apr 2008 06:32:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JnWqp-0001lL-1r for qemu-devel@nongnu.org; Sun, 20 Apr 2008 06:32:52 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JnWqo-0001lI-UZ for qemu-devel@nongnu.org; Sun, 20 Apr 2008 06:32:50 -0400 Received: from moutng.kundenserver.de ([212.227.126.188]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JnWqn-0004Q5-Up for qemu-devel@nongnu.org; Sun, 20 Apr 2008 06:32:50 -0400 Message-ID: <480B1BCE.2020304@mail.berlios.de> Date: Sun, 20 Apr 2008 12:32:46 +0200 From: Stefan Weil MIME-Version: 1.0 Subject: [Qemu-devel][BUG][PATCH] Change MIPS register access References: In-Reply-To: Content-Type: multipart/mixed; boundary="------------030505030709010805060009" 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 This is a multi-part message in MIME format. --------------030505030709010805060009 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Thiemo Seufer schrieb: > CVSROOT: /sources/qemu > Module name: qemu > Changes by: Thiemo Seufer 08/02/12 21:01:26 > > Modified files: > . : gdbstub.c > linux-user : main.c signal.c syscall.c > linux-user/mips: target_signal.h > linux-user/mips64: target_signal.h > linux-user/mipsn32: target_signal.h > target-mips : cpu.h op.c op_helper.c op_template.c > translate.c > > Log message: > Make MIPS MT implementation more cache friendly. Appendix mips.patch tries to complete Thiemo's changes. Please check it and add it to QEMU trunk if it is correct. I don't have a test scenario which could test the effects of the patch. Regards Stefan Weil --------------030505030709010805060009 Content-Type: text/x-diff; name="mips.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mips.patch" Index: target-mips/op.c =================================================================== --- target-mips/op.c (revision 4209) +++ target-mips/op.c (working copy) @@ -2300,7 +2300,7 @@ { int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); - T0 = env->gpr[PARAM1][other_tc]; + T0 = env->gpr[other_tc][PARAM1]; FORCE_RET(); } @@ -2308,7 +2308,7 @@ { int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); - T0 = env->LO[PARAM1][other_tc]; + T0 = env->LO[other_tc][PARAM1]; FORCE_RET(); } @@ -2316,7 +2316,7 @@ { int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); - T0 = env->HI[PARAM1][other_tc]; + T0 = env->HI[other_tc][PARAM1]; FORCE_RET(); } @@ -2324,7 +2324,7 @@ { int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); - T0 = env->ACX[PARAM1][other_tc]; + T0 = env->ACX[other_tc][PARAM1]; FORCE_RET(); } @@ -2340,7 +2340,7 @@ { int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); - T0 = env->gpr[PARAM1][other_tc]; + T0 = env->gpr[other_tc][PARAM1]; FORCE_RET(); } @@ -2348,7 +2348,7 @@ { int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); - T0 = env->LO[PARAM1][other_tc]; + T0 = env->LO[other_tc][PARAM1]; FORCE_RET(); } @@ -2356,7 +2356,7 @@ { int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); - T0 = env->HI[PARAM1][other_tc]; + T0 = env->HI[other_tc][PARAM1]; FORCE_RET(); } @@ -2364,7 +2364,7 @@ { int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); - T0 = env->ACX[PARAM1][other_tc]; + T0 = env->ACX[other_tc][PARAM1]; FORCE_RET(); } Index: target-mips/op_template.c =================================================================== --- target-mips/op_template.c (revision 4209) +++ target-mips/op_template.c (working copy) @@ -52,13 +52,13 @@ void glue(op_load_srsgpr_T0_gpr, REG) (void) { - T0 = env->gpr[REG][(env->CP0_SRSCtl >> CP0SRSCtl_PSS) & 0xf]; + T0 = env->gpr[(env->CP0_SRSCtl >> CP0SRSCtl_PSS) & 0xf][REG]; FORCE_RET(); } void glue(op_store_T0_srsgpr_gpr, REG) (void) { - env->gpr[REG][(env->CP0_SRSCtl >> CP0SRSCtl_PSS) & 0xf] = T0; + env->gpr[(env->CP0_SRSCtl >> CP0SRSCtl_PSS) & 0xf][REG] = T0; FORCE_RET(); } #endif --------------030505030709010805060009--