]> www.infradead.org Git - users/dwmw2/qemu.git/commit
target/ppc: Sign-extend large decrementer to 64-bits
authorNicholas Piggin <npiggin@gmail.com>
Tue, 8 Aug 2023 04:19:50 +0000 (14:19 +1000)
committerCédric Le Goater <clg@kaod.org>
Wed, 6 Sep 2023 09:19:33 +0000 (11:19 +0200)
commitc8fbc6b9f2f3c732ee3307093c1c5c367eaa64ae
tree83930108d35a9792dc83141008e1cc4dd95d1dd8
parent8e0a5ac87800ccc6dd5013f89f27652f4480ab33
target/ppc: Sign-extend large decrementer to 64-bits

When storing a large decrementer value with the most significant
implemented bit set, it is to be treated as a negative and sign
extended.

This isn't hit for book3s DEC because of another bug, fixing it
in the next patch exposes this one and can cause additional
problems, so fix this first. It can be hit with HDECR and other
edge triggered types.

Fixes: a8dafa52518 ("target/ppc: Implement large decrementer support for TCG")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
[ clg: removed extra cpu and pcc variables shadowing local variables ]
Signed-off-by: Cédric Le Goater <clg@kaod.org>
hw/ppc/ppc.c