From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35076) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xof8H-0003Cc-1h for qemu-devel@nongnu.org; Wed, 12 Nov 2014 16:07:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xof88-000699-0b for qemu-devel@nongnu.org; Wed, 12 Nov 2014 16:07:16 -0500 Received: from mail-wg0-x233.google.com ([2a00:1450:400c:c00::233]:44668) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xof87-000692-PY for qemu-devel@nongnu.org; Wed, 12 Nov 2014 16:07:07 -0500 Received: by mail-wg0-f51.google.com with SMTP id l18so15589492wgh.10 for ; Wed, 12 Nov 2014 13:07:07 -0800 (PST) Sender: Paolo Bonzini Message-ID: <5463CBF6.8080106@redhat.com> Date: Wed, 12 Nov 2014 22:07:02 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1412765732-45369-1-git-send-email-leon.alrae@imgtec.com> <1412765732-45369-15-git-send-email-leon.alrae@imgtec.com> In-Reply-To: <1412765732-45369-15-git-send-email-leon.alrae@imgtec.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 14/21] target-mips: add AUI, LSA and PCREL instruction families List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Leon Alrae , qemu-devel@nongnu.org Cc: yongbok.kim@imgtec.com, cristian.cuna@imgtec.com, james.hogan@imgtec.com, aurelien@aurel32.net, rth@twiddle.net On 08/10/2014 12:55, Leon Alrae wrote: > case OPC_LUI: > - tcg_gen_movi_tl(cpu_gpr[rt], imm << 16); > - MIPS_DEBUG("lui %s, " TARGET_FMT_lx, regnames[rt], uimm); > + if (rs != 0 && (ctx->insn_flags & ISA_MIPS32R6)) { > + /* OPC_AUI */ > + tcg_gen_addi_tl(cpu_gpr[rt], cpu_gpr[rs], imm << 16); > + tcg_gen_ext32s_tl(cpu_gpr[rt], cpu_gpr[rt]); > + MIPS_DEBUG("aui %s, %s, %04x", regnames[rt], regnames[rs], imm); > + } else { > + tcg_gen_movi_tl(cpu_gpr[rt], imm << 16); > + MIPS_DEBUG("lui %s, " TARGET_FMT_lx, regnames[rt], uimm); > + } > break; Coverity reported a gen_logic_imm(ctx, OPC_LUI, rs, -1, imm); where the -1 probably has to become zero now. Paolo