mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
accel/tcg: Add DisasContextBase argument to translator_ld*
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> [rth: Split out of a larger patch.] Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
4c9af1ea14
commit
4e116893c6
20 changed files with 58 additions and 50 deletions
|
@ -1627,7 +1627,7 @@ static void decode_micromips32_opc(CPUMIPSState *env, DisasContext *ctx)
|
|||
uint32_t op, minor, minor2, mips32_op;
|
||||
uint32_t cond, fmt, cc;
|
||||
|
||||
insn = translator_lduw(env, ctx->base.pc_next + 2);
|
||||
insn = translator_lduw(env, &ctx->base, ctx->base.pc_next + 2);
|
||||
ctx->opcode = (ctx->opcode << 16) | insn;
|
||||
|
||||
rt = (ctx->opcode >> 21) & 0x1f;
|
||||
|
|
|
@ -455,7 +455,7 @@ static void decode_i64_mips16(DisasContext *ctx,
|
|||
|
||||
static int decode_extended_mips16_opc(CPUMIPSState *env, DisasContext *ctx)
|
||||
{
|
||||
int extend = translator_lduw(env, ctx->base.pc_next + 2);
|
||||
int extend = translator_lduw(env, &ctx->base, ctx->base.pc_next + 2);
|
||||
int op, rx, ry, funct, sa;
|
||||
int16_t imm, offset;
|
||||
|
||||
|
@ -688,7 +688,7 @@ static int decode_ase_mips16e(CPUMIPSState *env, DisasContext *ctx)
|
|||
/* No delay slot, so just process as a normal instruction */
|
||||
break;
|
||||
case M16_OPC_JAL:
|
||||
offset = translator_lduw(env, ctx->base.pc_next + 2);
|
||||
offset = translator_lduw(env, &ctx->base, ctx->base.pc_next + 2);
|
||||
offset = (((ctx->opcode & 0x1f) << 21)
|
||||
| ((ctx->opcode >> 5) & 0x1f) << 16
|
||||
| offset) << 2;
|
||||
|
|
|
@ -3656,7 +3656,7 @@ static int decode_nanomips_32_48_opc(CPUMIPSState *env, DisasContext *ctx)
|
|||
int offset;
|
||||
int imm;
|
||||
|
||||
insn = translator_lduw(env, ctx->base.pc_next + 2);
|
||||
insn = translator_lduw(env, &ctx->base, ctx->base.pc_next + 2);
|
||||
ctx->opcode = (ctx->opcode << 16) | insn;
|
||||
|
||||
rt = extract32(ctx->opcode, 21, 5);
|
||||
|
@ -3775,7 +3775,7 @@ static int decode_nanomips_32_48_opc(CPUMIPSState *env, DisasContext *ctx)
|
|||
break;
|
||||
case NM_P48I:
|
||||
{
|
||||
insn = translator_lduw(env, ctx->base.pc_next + 4);
|
||||
insn = translator_lduw(env, &ctx->base, ctx->base.pc_next + 4);
|
||||
target_long addr_off = extract32(ctx->opcode, 0, 16) | insn << 16;
|
||||
switch (extract32(ctx->opcode, 16, 5)) {
|
||||
case NM_LI48:
|
||||
|
|
|
@ -16041,17 +16041,17 @@ static void mips_tr_translate_insn(DisasContextBase *dcbase, CPUState *cs)
|
|||
|
||||
is_slot = ctx->hflags & MIPS_HFLAG_BMASK;
|
||||
if (ctx->insn_flags & ISA_NANOMIPS32) {
|
||||
ctx->opcode = translator_lduw(env, ctx->base.pc_next);
|
||||
ctx->opcode = translator_lduw(env, &ctx->base, ctx->base.pc_next);
|
||||
insn_bytes = decode_isa_nanomips(env, ctx);
|
||||
} else if (!(ctx->hflags & MIPS_HFLAG_M16)) {
|
||||
ctx->opcode = translator_ldl(env, ctx->base.pc_next);
|
||||
ctx->opcode = translator_ldl(env, &ctx->base, ctx->base.pc_next);
|
||||
insn_bytes = 4;
|
||||
decode_opc(env, ctx);
|
||||
} else if (ctx->insn_flags & ASE_MICROMIPS) {
|
||||
ctx->opcode = translator_lduw(env, ctx->base.pc_next);
|
||||
ctx->opcode = translator_lduw(env, &ctx->base, ctx->base.pc_next);
|
||||
insn_bytes = decode_isa_micromips(env, ctx);
|
||||
} else if (ctx->insn_flags & ASE_MIPS16) {
|
||||
ctx->opcode = translator_lduw(env, ctx->base.pc_next);
|
||||
ctx->opcode = translator_lduw(env, &ctx->base, ctx->base.pc_next);
|
||||
insn_bytes = decode_ase_mips16e(env, ctx);
|
||||
} else {
|
||||
gen_reserved_instruction(ctx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue