Commit 12d961385b0216e4dec3a3d9fe9d6441c7832995

Authored by aurel32
1 parent 66ba317c

target-sh4: fix fldi0/fldi1

fldi0/fldi1 should be executed as a nop if FPSCR.FR is set instead of
generating an exception. Reported by Laurent Desnogues.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5759 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 2 additions and 4 deletions
target-sh4/translate.c
... ... @@ -1670,15 +1670,13 @@ static void _decode_opc(DisasContext * ctx)
1670 1670 case 0xf08d: /* fldi0 FRn - FPSCR: R[PR] */
1671 1671 if (!(ctx->fpscr & FPSCR_PR)) {
1672 1672 tcg_gen_movi_i32(cpu_fregs[FREG(B11_8)], 0);
1673   - return;
1674 1673 }
1675   - break;
  1674 + return;
1676 1675 case 0xf09d: /* fldi1 FRn - FPSCR: R[PR] */
1677 1676 if (!(ctx->fpscr & FPSCR_PR)) {
1678 1677 tcg_gen_movi_i32(cpu_fregs[FREG(B11_8)], 0x3f800000);
1679   - return;
1680 1678 }
1681   - break;
  1679 + return;
1682 1680 case 0xf0ad: /* fcnvsd FPUL,DRn */
1683 1681 {
1684 1682 TCGv_i64 fp = tcg_temp_new_i64();
... ...