target/arm: Set default NaN pattern explicitly

Set the default NaN pattern explicitly for the arm target.
This includes setting it for the old linux-user nwfpe emulation.
For nwfpe, our default doesn't match the real kernel, but we
avoid making a behaviour change in this commit.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20241202131347.498124-41-peter.maydell@linaro.org
This commit is contained in:
Peter Maydell 2024-12-11 15:31:05 +00:00
parent 369cb9cfe0
commit 29fbe4786e
2 changed files with 7 additions and 0 deletions

View file

@ -69,6 +69,11 @@ void resetFPA11(void)
* this late date.
*/
set_float_2nan_prop_rule(float_2nan_prop_s_ab, &fpa11->fp_status);
/*
* Use the same default NaN value as Arm VFP. This doesn't match
* the Linux kernel's nwfpe emulation, which uses an all-1s value.
*/
set_float_default_nan_pattern(0b01000000, &fpa11->fp_status);
}
void SetRoundingMode(const unsigned int opcode)