OSDN Git Service

target/ppc: Fix 64-bit decrementer
authorCédric Le Goater <clg@kaod.org>
Mon, 20 Sep 2021 06:12:03 +0000 (08:12 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 30 Sep 2021 02:26:06 +0000 (12:26 +1000)
commit4d9b8ef9b5ab880d491b0c41d222b42ed83bdbfe
tree201bec0192a3ac479d416a4dccad08bd196afe3b
parentaf96d2e69227fc25f663d840527dbe2a0c592400
target/ppc: Fix 64-bit decrementer

The current way the mask is built can overflow with a 64-bit decrementer.
Use sextract64() to extract the signed values and remove the logic to
handle negative values which has become useless.

Cc: Luis Fernando Fujita Pires <luis.pires@eldorado.org.br>
Fixes: a8dafa525181 ("target/ppc: Implement large decrementer support for TCG")
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20210920061203.989563-5-clg@kaod.org>
Reviewed-by: Luis Pires <luis.pires@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/ppc.c