mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
target/hppa: Set FloatInfZeroNaNRule explicitly
Set the FloatInfZeroNaNRule explicitly for the HPPA target, so we can remove the ifdef from pickNaNMulAdd(). As this is the last target to be converted to explicitly setting the rule, we can remove the fallback code in pickNaNMulAdd() entirely. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20241202131347.498124-14-peter.maydell@linaro.org
This commit is contained in:
parent
0fb7fa29d3
commit
2bf5629c97
2 changed files with 3 additions and 12 deletions
|
@ -475,8 +475,6 @@ static int pickNaN(FloatClass a_cls, FloatClass b_cls,
|
||||||
static int pickNaNMulAdd(FloatClass a_cls, FloatClass b_cls, FloatClass c_cls,
|
static int pickNaNMulAdd(FloatClass a_cls, FloatClass b_cls, FloatClass c_cls,
|
||||||
bool infzero, float_status *status)
|
bool infzero, float_status *status)
|
||||||
{
|
{
|
||||||
FloatInfZeroNaNRule rule = status->float_infzeronan_rule;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We guarantee not to require the target to tell us how to
|
* We guarantee not to require the target to tell us how to
|
||||||
* pick a NaN if we're always returning the default NaN.
|
* pick a NaN if we're always returning the default NaN.
|
||||||
|
@ -485,21 +483,12 @@ static int pickNaNMulAdd(FloatClass a_cls, FloatClass b_cls, FloatClass c_cls,
|
||||||
*/
|
*/
|
||||||
assert(!status->default_nan_mode);
|
assert(!status->default_nan_mode);
|
||||||
|
|
||||||
if (rule == float_infzeronan_none) {
|
|
||||||
/*
|
|
||||||
* Temporarily fall back to ifdef ladder
|
|
||||||
*/
|
|
||||||
#if defined(TARGET_HPPA)
|
|
||||||
rule = float_infzeronan_dnan_never;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
if (infzero) {
|
if (infzero) {
|
||||||
/*
|
/*
|
||||||
* Inf * 0 + NaN -- some implementations return the default NaN here,
|
* Inf * 0 + NaN -- some implementations return the default NaN here,
|
||||||
* and some return the input NaN.
|
* and some return the input NaN.
|
||||||
*/
|
*/
|
||||||
switch (rule) {
|
switch (status->float_infzeronan_rule) {
|
||||||
case float_infzeronan_dnan_never:
|
case float_infzeronan_dnan_never:
|
||||||
return 2;
|
return 2;
|
||||||
case float_infzeronan_dnan_always:
|
case float_infzeronan_dnan_always:
|
||||||
|
|
|
@ -55,6 +55,8 @@ void HELPER(loaded_fr0)(CPUHPPAState *env)
|
||||||
* HPPA does note implement a CPU reset method at all...
|
* HPPA does note implement a CPU reset method at all...
|
||||||
*/
|
*/
|
||||||
set_float_2nan_prop_rule(float_2nan_prop_s_ab, &env->fp_status);
|
set_float_2nan_prop_rule(float_2nan_prop_s_ab, &env->fp_status);
|
||||||
|
/* For inf * 0 + NaN, return the input NaN */
|
||||||
|
set_float_infzeronan_rule(float_infzeronan_dnan_never, &env->fp_status);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cpu_hppa_loaded_fr0(CPUHPPAState *env)
|
void cpu_hppa_loaded_fr0(CPUHPPAState *env)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue