[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 13/15] target-mips: microMIPS32 R6 Major inst
From: |
Leon Alrae |
Subject: |
Re: [Qemu-devel] [PATCH v2 13/15] target-mips: microMIPS32 R6 Major instructions |
Date: |
Mon, 22 Jun 2015 13:19:53 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
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
- Re: [Qemu-devel] [PATCH v2 04/15] target-mips: refactor {D}LSA, {D}ALIGN, {D}BITSWAP, (continued)
- [Qemu-devel] [PATCH v2 05/15] target-mips: rearrange gen_compute_compact_branch, Yongbok Kim, 2015/06/19
- [Qemu-devel] [PATCH v2 07/15] target-mips: signal RI for removed instructions in microMIPS R6, Yongbok Kim, 2015/06/19
- [Qemu-devel] [PATCH v2 06/15] target-mips: raise RI exceptions when FIR.PS = 0, Yongbok Kim, 2015/06/19
- [Qemu-devel] [PATCH v2 14/15] target-mips: microMIPS32 R6 POOL16{A, C} instructions, Yongbok Kim, 2015/06/19
- [Qemu-devel] [PATCH v2 15/15] target-mips: add mips32r6-generic CPU definition, Yongbok Kim, 2015/06/19
- [Qemu-devel] [PATCH v2 13/15] target-mips: microMIPS32 R6 Major instructions, Yongbok Kim, 2015/06/19
- Re: [Qemu-devel] [PATCH v2 13/15] target-mips: microMIPS32 R6 Major instructions,
Leon Alrae <=
- [Qemu-devel] [PATCH v2 08/15] target-mips: add microMIPS32 R6 opcode enum, Yongbok Kim, 2015/06/19
- [Qemu-devel] [PATCH v2 12/15] target-mips: microMIPS32 R6 POOL32{I, C} instructions, Yongbok Kim, 2015/06/19
- [Qemu-devel] [PATCH v2 11/15] target-mips: microMIPS32 R6 POOL32F instructions, Yongbok Kim, 2015/06/19
- [Qemu-devel] [PATCH v2 10/15] target-mips: microMIPS32 R6 POOL32A{XF} instructions, Yongbok Kim, 2015/06/19
- [Qemu-devel] [PATCH v2 09/15] target-mips: microMIPS32 R6 branches and jumps, Yongbok Kim, 2015/06/19