From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nitzv-00054R-Cr for qemu-devel@nongnu.org; Sat, 20 Feb 2010 13:24:11 -0500 Received: from [199.232.76.173] (port=57120 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nitzu-00054J-JJ for qemu-devel@nongnu.org; Sat, 20 Feb 2010 13:24:10 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nitzt-0006hK-TX for qemu-devel@nongnu.org; Sat, 20 Feb 2010 13:24:10 -0500 Received: from mx20.gnu.org ([199.232.41.8]:58201) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Nitzt-0006h0-Ig for qemu-devel@nongnu.org; Sat, 20 Feb 2010 13:24:09 -0500 Received: from mail.codesourcery.com ([38.113.113.100]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nitzs-0001Vx-NN for qemu-devel@nongnu.org; Sat, 20 Feb 2010 13:24:09 -0500 From: Nathan Froyd Date: Sat, 20 Feb 2010 10:24:07 -0800 Message-Id: <1266690247-29046-1-git-send-email-froydnj@codesourcery.com> Subject: [Qemu-devel] [PATCH] target-mips: fix ROTR and DROTR by zero List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aurelien@aurel32.net Signed-off-by: Nathan Froyd --- target-mips/translate.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/target-mips/translate.c b/target-mips/translate.c index dfea6f6..de5ac18 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c @@ -1476,6 +1476,8 @@ static void gen_shift_imm(CPUState *env, DisasContext *ctx, uint32_t opc, tcg_gen_rotri_i32(t1, t1, uimm); tcg_gen_ext_i32_tl(cpu_gpr[rt], t1); tcg_temp_free_i32(t1); + } else { + tcg_gen_ext32s_tl(cpu_gpr[rt], t0); } opn = "rotr"; break; @@ -1495,6 +1497,8 @@ static void gen_shift_imm(CPUState *env, DisasContext *ctx, uint32_t opc, case OPC_DROTR: if (uimm != 0) { tcg_gen_rotri_tl(cpu_gpr[rt], t0, uimm); + } else { + tcg_gen_mov_tl(cpu_gpr[rt], t0); } opn = "drotr"; break; -- 1.6.3.2