Skip to content

Commit f31cd81

Browse files
committed
target/ppc: Make madd instructions work with hardfpu
Signed-off-by: Víctor Colombo <[email protected]>
1 parent 8459a16 commit f31cd81

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

target/ppc/fpu_helper.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2219,6 +2219,11 @@ void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, \
22192219
for (i = 0; i < nels; i++) { \
22202220
float_status tstat = env->fp_status; \
22212221
set_float_exception_flags(0, &tstat); \
2222+
/* if function doesn't change FI, and XX is already set */ \
2223+
if (!(sfifprf) && (env->fpscr & FP_XX)) { \
2224+
/* set float_flag_inexact to allow hardfpu use */ \
2225+
tstat.float_exception_flags |= float_flag_inexact; \
2226+
} \
22222227
t.fld = tp##_muladd(s1->fld, s3->fld, s2->fld, maddflgs, &tstat); \
22232228
env->fp_status.float_exception_flags |= tstat.float_exception_flags; \
22242229
\

0 commit comments

Comments
 (0)