提交 db77d852 编写于 作者: L Leon Alrae

target-mips: add missing restriction in DAUI instruction

rs cannot be the zero register, Reserved Instruction exception must be
signalled for this case.
Signed-off-by: NLeon Alrae <leon.alrae@imgtec.com>
Reviewed-by: NAurelien Jarno <aurelien@aurel32.net>
上级 3adafef2
...@@ -19525,7 +19525,9 @@ static void decode_opc(CPUMIPSState *env, DisasContext *ctx) ...@@ -19525,7 +19525,9 @@ static void decode_opc(CPUMIPSState *env, DisasContext *ctx)
#if defined(TARGET_MIPS64) #if defined(TARGET_MIPS64)
/* OPC_DAUI */ /* OPC_DAUI */
check_mips_64(ctx); check_mips_64(ctx);
if (rt != 0) { if (rs == 0) {
generate_exception(ctx, EXCP_RI);
} else if (rt != 0) {
TCGv t0 = tcg_temp_new(); TCGv t0 = tcg_temp_new();
gen_load_gpr(t0, rs); gen_load_gpr(t0, rs);
tcg_gen_addi_tl(cpu_gpr[rt], t0, imm << 16); tcg_gen_addi_tl(cpu_gpr[rt], t0, imm << 16);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册