[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 14/21] target-mips: add AUI, LSA and PCREL in
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v4 14/21] target-mips: add AUI, LSA and PCREL instruction families |
Date: |
Wed, 12 Nov 2014 22:07:02 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
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
- Re: [Qemu-devel] [PATCH v4 14/21] target-mips: add AUI, LSA and PCREL instruction families,
Paolo Bonzini <=