target/ppc: Clear fpstatus flags on helpers missing it
commitc3f24257e3c094122a82611db3d7c3e8b25d9153
authorVíctor Colombo <victor.colombo@eldorado.org.br>
Tue, 6 Sep 2022 12:55:23 +0000 (6 09:55 -0300)
committerDaniel Henrique Barboza <danielhb413@gmail.com>
Tue, 20 Sep 2022 13:54:06 +0000 (20 10:54 -0300)
tree66070fba97df44c57a3a7c0d8a6ceafc3bb94285
parent4b65b6e76977895fe43eb340c54b552fd16fe1ce
target/ppc: Clear fpstatus flags on helpers missing it

In ppc emulation, exception flags are not cleared at the end of an
instruction. Instead, the next instruction is responsible to clear
it before its emulation. However, some helpers are not doing it,
causing an issue where the previously set exception flags are being
used and leading to incorrect values being set in FPSCR.
Fix this by clearing fp_status before doing the instruction 'real' work
for the following helpers that were missing this behavior:

- VSX_CVT_INT_TO_FP_VECTOR
- VSX_CVT_FP_TO_FP
- VSX_CVT_FP_TO_INT_VECTOR
- VSX_CVT_FP_TO_INT2
- VSX_CVT_FP_TO_INT
- VSX_CVT_FP_TO_FP_HP
- VSX_CVT_FP_TO_FP_VECTOR
- VSX_CMP
- VSX_ROUND
- xscvqpdp
- xscvdpsp[n]

Signed-off-by: Víctor Colombo <victor.colombo@eldorado.org.br>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20220906125523.38765-9-victor.colombo@eldorado.org.br>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
target/ppc/fpu_helper.c