[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: |
Yongbok Kim |
Subject: |
Re: [Qemu-devel] [PATCH v2 13/15] target-mips: microMIPS32 R6 Major instructions |
Date: |
Tue, 23 Jun 2015 10:08:18 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
On 22/06/2015 13:19, Leon Alrae wrote:
> 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
>
That's weird to see that in the doc. I've checked the instruction and it
has been confirmed that the instruction is *not* clearing the bottom 2 bits
of the PC. This issue will be corrected in the next doc release.
Regards,
Yongbok
- [Qemu-devel] [PATCH v2 05/15] target-mips: rearrange gen_compute_compact_branch, (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
- [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