qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 16/23] target/mips: Extract trap code into env->error_code


From: Richard Henderson
Subject: Re: [PATCH v3 16/23] target/mips: Extract trap code into env->error_code
Date: Wed, 3 Nov 2021 11:46:56 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

On 11/3/21 11:21 AM, Philippe Mathieu-Daudé wrote:
      do_trap:
-        gen_trap(ctx, mips32_op, rs, rt, -1);
+        gen_trap(ctx, mips32_op, rs, rt, -1, extract32(ctx->opcode, 12, 4));
          break;
  #ifndef CONFIG_USER_ONLY
      case MFC0:
@@ -2439,7 +2439,7 @@ static void decode_micromips32_opc(CPUMIPSState *env, 
DisasContext *ctx)
              check_insn_opc_removed(ctx, ISA_MIPS_R6);
              mips32_op = OPC_TEQI;
          do_trapi:
-            gen_trap(ctx, mips32_op, rs, -1, imm);
+            gen_trap(ctx, mips32_op, rs, -1, imm, 0);

IIUC the microMIPS manual (MD00594):

                gen_trap(ctx, mips32_op, rs, -1, imm,
                         extract32(ctx->opcode, 12, 4));

No, there is no code for trap-immediate.
You can see the 12:4 code above for trap-register.

See the 3.05 revision of the manual, which still contains TEQI. Note that all trap-immediate opcodes were removed for R6.


r~



reply via email to

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