sh4: Fix new fpu opcodes This patch works around problems with references to the cst8 section that occured on powerpc. This fix has been tested using gentoo crossdev and a combination of gcc-3.4.6 and glibc-2.4. Signed-off-by: Magnus Damm --- 0002/target-sh4/op.c +++ work/target-sh4/op.c 2007-05-14 17:46:06.000000000 +0900 @@ -804,9 +804,9 @@ void OPPROTO op_ftrc_DT(void) RETURN(); } -void OPPROTO op_movl_T0_FT0(void) +void OPPROTO op_fmov_T0_frN(void) { - FT0 = T0; + *(unsigned int *)&env->fregs[PARAM1] = T0; RETURN(); } --- 0002/target-sh4/translate.c +++ work/target-sh4/translate.c 2007-05-14 17:46:20.000000000 +0900 @@ -1156,16 +1156,14 @@ void decode_opc(DisasContext * ctx) case 0xf08d: /* fldi0 FRn */ if (!(ctx->fpscr & FPSCR_PR)) { gen_op_movl_imm_T0(0); - gen_op_movl_T0_FT0(); - gen_op_fmov_FT0_frN(FREG(B11_8)); + gen_op_fmov_T0_frN(FREG(B11_8)); return; } break; case 0xf09d: /* fldi1 FRn */ if (!(ctx->fpscr & FPSCR_PR)) { gen_op_movl_imm_T0(0x3f800000); - gen_op_movl_T0_FT0(); - gen_op_fmov_FT0_frN(FREG(B11_8)); + gen_op_fmov_T0_frN(FREG(B11_8)); return; } break;