qemu-devel
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]