Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ky0zD-0007hV-5d for qemu-devel@nongnu.org; Thu, 06 Nov 2008 04:17:07 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ky0zB-0007gy-Vu for qemu-devel@nongnu.org; Thu, 06 Nov 2008 04:17:06 -0500 Received: from [199.232.76.173] (port=39516 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ky0zB-0007gl-Au for qemu-devel@nongnu.org; Thu, 06 Nov 2008 04:17:05 -0500 Received: from savannah.gnu.org ([199.232.41.3]:37159 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 1Ky0zB-0006U9-R2 for qemu-devel@nongnu.org; Thu, 06 Nov 2008 04:17:05 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1Ky0z8-0003jg-Ve for qemu-devel@nongnu.org; Thu, 06 Nov 2008 09:17:03 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1Ky0z5-0003j6-8R for qemu-devel@nongnu.org; Thu, 06 Nov 2008 09:17:01 +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: Thu, 06 Nov 2008 09:16:59 +0000 Subject: [Qemu-devel] [5638] target-alpha: Fix ret 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: 5638 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5638 Author: aurel32 Date: 2008-11-06 09:16:57 +0000 (Thu, 06 Nov 2008) Log Message: ----------- target-alpha: Fix ret instruction Hopefully pine doesn't corrupt this patch, I've had problems recently. For an alpha "ret" instruction, of the type ret $26 The return was being ignored. This is because in translate.c register $26 (the return address) was being over-written with the current PC before it could be jumped to. Thus the ret was ignored. This patch just re-orders things so the return address is processed before it is over-written with the current PC. (Vince Weaver) Modified Paths: -------------- trunk/target-alpha/translate.c Modified: trunk/target-alpha/translate.c =================================================================== --- trunk/target-alpha/translate.c 2008-11-05 21:22:34 UTC (rev 5637) +++ trunk/target-alpha/translate.c 2008-11-06 09:16:57 UTC (rev 5638) @@ -1634,12 +1634,12 @@ break; #endif case 0x1A: - if (ra != 31) - tcg_gen_movi_i64(cpu_ir[ra], ctx->pc); if (rb != 31) tcg_gen_andi_i64(cpu_pc, cpu_ir[rb], ~3); else tcg_gen_movi_i64(cpu_pc, 0); + if (ra != 31) + tcg_gen_movi_i64(cpu_ir[ra], ctx->pc); /* Those four jumps only differ by the branch prediction hint */ switch (fn2) { case 0x0: