mirror of https://gitee.com/openkylin/qemu.git
target-sh4: ignore ocbp and ocbwb instructions
ocbp and ocbwb controls the writeback of a cache line to memory. They are supposed to do nothing in case of a cache miss. Given QEMU only partially emulate caches, it is safe to ignore these instructions. This fixes a kernel oops when trying to access an rtl8139 NIC with recent versions. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
05b922dd0a
commit
0cdb95549f
|
@ -1652,18 +1652,10 @@ static void _decode_opc(DisasContext * ctx)
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case 0x00a3: /* ocbp @Rn */
|
case 0x00a3: /* ocbp @Rn */
|
||||||
{
|
|
||||||
TCGv dummy = tcg_temp_new();
|
|
||||||
tcg_gen_qemu_ld32s(dummy, REG(B11_8), ctx->memidx);
|
|
||||||
tcg_temp_free(dummy);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
case 0x00b3: /* ocbwb @Rn */
|
case 0x00b3: /* ocbwb @Rn */
|
||||||
{
|
/* These instructions are supposed to do nothing in case of
|
||||||
TCGv dummy = tcg_temp_new();
|
a cache miss. Given that we only partially emulate caches
|
||||||
tcg_gen_qemu_ld32s(dummy, REG(B11_8), ctx->memidx);
|
it is safe to simply ignore them. */
|
||||||
tcg_temp_free(dummy);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
case 0x0083: /* pref @Rn */
|
case 0x0083: /* pref @Rn */
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue