Home
last modified time | relevance | path

Searched hist:a3d67f3e (Results 1 – 1 of 1) sorted by relevance

/openbmc/qemu/target/ppc/
H A Dint_helper.ca3d67f3e Mon Aug 23 10:02:35 CDT 2021 Luis Pires <luis.pires@eldorado.org.br> target/ppc: fix setting of CR flags in bcdcfsq

According to the ISA, CR should be set based on the source value, and
not on the packed decimal result.
The way this was implemented would cause GT, LT and EQ to be set
incorrectly when the source value was too large and the 31 least
significant digits of the packed decimal result ended up being all zero.
This would happen for source values of +/-10^31, +/-10^32, etc.

The new implementation fixes this and also skips the result calculation
altogether in case of src overflow.

Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
Message-Id: <20210823150235.35759-1-luis.pires@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>