target/hppa: Fix DCOR reconstruction of carry bits
commitd0ae87a27c212b4dda1b5e83507f5ebdfd019097
authorRichard Henderson <richard.henderson@linaro.org>
Mon, 25 Mar 2024 00:03:05 +0000 (24 14:03 -1000)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 27 Mar 2024 22:15:25 +0000 (27 12:15 -1000)
tree6a491aac5f72972a081c609ec8da436d9e989c3a
parent7d50b696601deecfcefcfb2d8ba9eaf98cb294b6
target/hppa: Fix DCOR reconstruction of carry bits

The carry bits for each nibble N are located in bit (N+1)*4,
so the shift by 3 was off by one.  Furthermore, the carry bit
for the most significant carry bit is indeed located in bit 64,
which is located in a different storage word.

Use a double-word shift-right to reassemble into a single word
and place them all at bit 0 of their respective nibbles.

Tested-by: Helge Deller <deller@gmx.de>
Reviewed-by: Helge Deller <deller@gmx.de>
Fixes: b2167459ae4 ("target-hppa: Implement basic arithmetic")
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
target/hppa/translate.c