@@ -249,12 +249,12 @@ static inline void gen_reset_fpstatus(void)
gen_helper_reset_fpstatus(cpu_env);
}
-static inline void gen_op_mfcr(TCGv dest, int first_cr, int shift)
+static inline void gen_op_mfcr(TCGv_i32 dest, int first_cr, int shift)
{
tcg_gen_shli_i32(dest, cpu_crf[first_cr >> 2], shift);
}
-static inline void gen_op_mtcr(int first_cr, TCGv src, int shift)
+static inline void gen_op_mtcr(int first_cr, TCGv_i32 src, int shift)
{
if (shift) {
tcg_gen_shri_i32(cpu_crf[first_cr >> 2], src, shift);
@@ -2498,7 +2498,7 @@ static void gen_mcrfs(DisasContext *ctx)
tcg_temp_free(tmp);
gen_op_mtcr(crfD(ctx->opcode) << 2, tmp32, 0);
tcg_gen_andi_tl(cpu_fpscr, cpu_fpscr, ~(0xF << bfa));
- tcg_temp_free(tmp32);
+ tcg_temp_free_i32(tmp32);
}
/* mffs */
@@ -4208,6 +4208,7 @@ static void gen_mfcr(DisasContext *ctx)
crn = ctz32 (crm);
gen_op_mfcr(t0, (7 - crn) * 4, crn * 4);
tcg_gen_extu_i32_tl(cpu_gpr[rD(ctx->opcode)], t0);
+ tcg_temp_free_i32(t0);
}
} else {
gen_helper_mfocrf(cpu_gpr[rD(ctx->opcode)], cpu_env);