diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c index dc86c1c7db..fbdc48911e 100644 --- a/hw/ppc/ppc.c +++ b/hw/ppc/ppc.c @@ -806,6 +806,8 @@ static void __cpu_ppc_store_decr(PowerPCCPU *cpu, uint64_t *nextp, int64_t signed_decr; /* Truncate value to decr_width and sign extend for simplicity */ + value = extract64(value, 0, nr_bits); + decr = extract64(decr, 0, nr_bits); signed_value = sextract64(value, 0, nr_bits); signed_decr = sextract64(decr, 0, nr_bits);