From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42457) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z70ho-00025g-3n for qemu-devel@nongnu.org; Mon, 22 Jun 2015 08:20:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z70hi-0006hb-Jt for qemu-devel@nongnu.org; Mon, 22 Jun 2015 08:20:04 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:3996) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z70hi-0006hL-ED for qemu-devel@nongnu.org; Mon, 22 Jun 2015 08:19:58 -0400 Message-ID: <5587FD69.1030908@imgtec.com> Date: Mon, 22 Jun 2015 13:19:53 +0100 From: Leon Alrae MIME-Version: 1.0 References: <1434731138-4918-1-git-send-email-yongbok.kim@imgtec.com> <1434731138-4918-14-git-send-email-yongbok.kim@imgtec.com> In-Reply-To: <1434731138-4918-14-git-send-email-yongbok.kim@imgtec.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 13/15] target-mips: microMIPS32 R6 Major instructions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Yongbok Kim , qemu-devel@nongnu.org Cc: aurelien@aurel32.net On 19/06/2015 17:25, Yongbok Kim wrote: > @@ -14958,8 +14966,28 @@ static void decode_micromips32_opc(CPUMIPSState *env, DisasContext *ctx) > do_cop1: > gen_cop1_ldst(ctx, mips32_op, rt, rs, imm); > break; > - case ADDIUPC: > - { > + case ADDIUPC: /* PCREL: ADDIUPC, AUIPC, ALUIPC, LWPC */ > + if (ctx->insn_flags & ISA_MIPS32R6) { > + /* PCREL: ADDIUPC, AUIPC, ALUIPC, LWPC */ > + switch ((ctx->opcode >> 16) & 0x1f) { > + case ADDIUPC_00 ... ADDIUPC_07: > + gen_pcrel(ctx, OPC_ADDIUPC, ctx->pc & ~0x3, rt); > + break; > + case AUIPC: > + gen_pcrel(ctx, OPC_AUIPC, ctx->pc, rt); According to the manual you should pass "ctx->pc & ~0x3" here. Otherwise the patch looks good to me. Leon