From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kbgey-0005im-WD for qemu-devel@nongnu.org; Fri, 05 Sep 2008 15:07:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kbgex-0005iJ-Mz for qemu-devel@nongnu.org; Fri, 05 Sep 2008 15:07:56 -0400 Received: from [199.232.76.173] (port=54428 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kbgex-0005iF-EN for qemu-devel@nongnu.org; Fri, 05 Sep 2008 15:07:55 -0400 Received: from savannah.gnu.org ([199.232.41.3]:43837 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 1Kbgex-0005Ck-BV for qemu-devel@nongnu.org; Fri, 05 Sep 2008 15:07:55 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1Kbgew-0007jT-IJ for qemu-devel@nongnu.org; Fri, 05 Sep 2008 19:07:54 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1Kbgew-0007jP-9z for qemu-devel@nongnu.org; Fri, 05 Sep 2008 19:07:54 +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: Fri, 05 Sep 2008 19:07:54 +0000 Subject: [Qemu-devel] [5171] fix alpha cmovxx instruction 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: 5171 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5171 Author: aurel32 Date: 2008-09-05 19:07:53 +0000 (Fri, 05 Sep 2008) Log Message: ----------- fix alpha cmovxx instruction The CMOV instruction is defined by the alpha manual as: CMOVxx Ra.rq,Rb.rq,Rc.wq !Operate format CMOVxx Ra.rq,#b.ib,Rc.wq !Operate format Operation: IF TEST(Rav, Condition_based_on_Opcode) THEN Rc ?\226?\134?\144 Rbv The current qemu behavior inverses Ra and Rb. This is fixed by this patch. Signed-off-by: Tristan Gingold Signed-off-by: Aurelien Jarno Modified Paths: -------------- trunk/target-alpha/translate.c Modified: trunk/target-alpha/translate.c =================================================================== --- trunk/target-alpha/translate.c 2008-09-05 17:17:55 UTC (rev 5170) +++ trunk/target-alpha/translate.c 2008-09-05 19:07:53 UTC (rev 5171) @@ -390,15 +390,15 @@ int islit, int8_t lit) { if (ra != 31) - tcg_gen_mov_i64(cpu_T[1], cpu_ir[ra]); + tcg_gen_mov_i64(cpu_T[0], cpu_ir[ra]); else - tcg_gen_movi_i64(cpu_T[1], 0); + tcg_gen_movi_i64(cpu_T[0], 0); if (islit) - tcg_gen_movi_i64(cpu_T[0], lit); + tcg_gen_movi_i64(cpu_T[1], lit); else if (rb != 31) - tcg_gen_mov_i64(cpu_T[0], cpu_ir[rb]); + tcg_gen_mov_i64(cpu_T[1], cpu_ir[rb]); else - tcg_gen_movi_i64(cpu_T[0], 0); + tcg_gen_movi_i64(cpu_T[1], 0); (*gen_test_op)(); gen_op_cmov_ir(rc); }