From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JsFa5-0001WE-GV for qemu-devel@nongnu.org; Sat, 03 May 2008 07:07:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JsFa3-0001Tl-G3 for qemu-devel@nongnu.org; Sat, 03 May 2008 07:07:03 -0400 Received: from [199.232.76.173] (port=56842 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JsFa3-0001TJ-8c for qemu-devel@nongnu.org; Sat, 03 May 2008 07:07:03 -0400 Received: from savannah.gnu.org ([199.232.41.3] 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 1JsFa2-0006F5-E3 for qemu-devel@nongnu.org; Sat, 03 May 2008 07:07:02 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1JsFa0-0001LQ-Dh for qemu-devel@nongnu.org; Sat, 03 May 2008 11:07:00 +0000 Received: from ths by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1JsFa0-0001LM-4H for qemu-devel@nongnu.org; Sat, 03 May 2008 11:07:00 +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: Sat, 03 May 2008 11:07:00 +0000 Subject: [Qemu-devel] [4307] Fix MIPS MT GPR accesses, thanks Stefan Weil. 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: 4307 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4307 Author: ths Date: 2008-05-03 11:06:59 +0000 (Sat, 03 May 2008) Log Message: ----------- Fix MIPS MT GPR accesses, thanks Stefan Weil. Modified Paths: -------------- trunk/target-mips/op.c trunk/target-mips/op_template.c Modified: trunk/target-mips/op.c =================================================================== --- trunk/target-mips/op.c 2008-05-03 08:36:16 UTC (rev 4306) +++ trunk/target-mips/op.c 2008-05-03 11:06:59 UTC (rev 4307) @@ -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(); } Modified: trunk/target-mips/op_template.c =================================================================== --- trunk/target-mips/op_template.c 2008-05-03 08:36:16 UTC (rev 4306) +++ trunk/target-mips/op_template.c 2008-05-03 11:06:59 UTC (rev 4307) @@ -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