mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 23:55:39 +00:00
target-mips: add missing restriction in DAUI instruction
rs cannot be the zero register, Reserved Instruction exception must be signalled for this case. Backports commit db77d8523909b32d798cd2c80de422b68f9e5c42 from qemu
This commit is contained in:
parent
1a441096c0
commit
18dcbc7a64
|
@ -19676,7 +19676,9 @@ static void decode_opc(CPUMIPSState *env, DisasContext *ctx, bool *insn_need_pat
|
|||
#if defined(TARGET_MIPS64)
|
||||
/* OPC_DAUI */
|
||||
check_mips_64(ctx);
|
||||
if (rt != 0) {
|
||||
if (rs == 0) {
|
||||
generate_exception(ctx, EXCP_RI);
|
||||
} else if (rt != 0) {
|
||||
TCGv t0 = tcg_temp_new(tcg_ctx);
|
||||
gen_load_gpr(ctx, t0, rs);
|
||||
tcg_gen_addi_tl(tcg_ctx, *cpu_gpr[rt], t0, imm << 16);
|
||||
|
|
Loading…
Reference in a new issue