From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KeuA0-0003ri-Vl for qemu-devel@nongnu.org; Sun, 14 Sep 2008 12:09:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KeuA0-0003rW-Bi for qemu-devel@nongnu.org; Sun, 14 Sep 2008 12:09:16 -0400 Received: from [199.232.76.173] (port=34196 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KeuA0-0003rT-7y for qemu-devel@nongnu.org; Sun, 14 Sep 2008 12:09:16 -0400 Received: from savannah.gnu.org ([199.232.41.3]:51976 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 1KeuA0-0007z0-1K for qemu-devel@nongnu.org; Sun, 14 Sep 2008 12:09:16 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1Keu9z-00052Z-Ia for qemu-devel@nongnu.org; Sun, 14 Sep 2008 16:09:15 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1Keu9z-00052V-CV for qemu-devel@nongnu.org; Sun, 14 Sep 2008 16:09:15 +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: Sun, 14 Sep 2008 16:09:15 +0000 Subject: [Qemu-devel] [5211] alpha: fix lit sign 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: 5211 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5211 Author: aurel32 Date: 2008-09-14 16:09:15 +0000 (Sun, 14 Sep 2008) Log Message: ----------- alpha: fix lit sign according to the alpha arch reference, the literal field of an operate instruction is unsigned: If bit <12> of the instruction is 1, an 8-bit zero-extended literal constant is formed by bits <20:13> of the instruction. The l teral is interpreted as a positive integer bet ween 0 and 255 and is zero-extended to 64 bits. This patch fixes the mis-interpretation of the literal field. (Tristan Gingold) Modified Paths: -------------- trunk/target-alpha/translate.c Modified: trunk/target-alpha/translate.c =================================================================== --- trunk/target-alpha/translate.c 2008-09-14 13:59:34 UTC (rev 5210) +++ trunk/target-alpha/translate.c 2008-09-14 16:09:15 UTC (rev 5211) @@ -351,7 +351,7 @@ static always_inline void gen_arith2 (DisasContext *ctx, void (*gen_arith_op)(void), - int rb, int rc, int islit, int8_t lit) + int rb, int rc, int islit, uint8_t lit) { if (islit) tcg_gen_movi_i64(cpu_T[0], lit); @@ -367,7 +367,7 @@ static always_inline void gen_arith3 (DisasContext *ctx, void (*gen_arith_op)(void), int ra, int rb, int rc, - int islit, int8_t lit) + int islit, uint8_t lit) { if (ra != 31) tcg_gen_mov_i64(cpu_T[0], cpu_ir[ra]); @@ -387,7 +387,7 @@ static always_inline void gen_cmov (DisasContext *ctx, void (*gen_test_op)(void), int ra, int rb, int rc, - int islit, int8_t lit) + int islit, uint8_t lit) { if (ra != 31) tcg_gen_mov_i64(cpu_T[0], cpu_ir[ra]);