diff options
author | Anton Blanchard <anton@ozlabs.org> | 2019-05-07 10:48:11 +1000 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2019-05-29 11:39:44 +1000 |
commit | 7fa0ddc1d63806769d1b6246a62708d3bde39037 (patch) | |
tree | 2b6db6925ba01f1229edf6a24816db5010ca7088 /target/ppc | |
parent | 63be02fc69d44442dc7eb316d44f1c1fbe49c075 (diff) |
target/ppc: Fix vsum2sws
A recent cleanup changed the pre zeroing of the result from 64 bit
to 32 bit operations:
- result.u64[i] = 0;
+ result.VsrW(i) = 0;
This corrupts the result.
Fixes: 60594fea298d ("target/ppc: remove various HOST_WORDS_BIGENDIAN hacks in int_helper.c")
Signed-off-by: Anton Blanchard <anton@ozlabs.org>
Message-Id: <20190507004811.29968-9-anton@ozlabs.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target/ppc')
-rw-r--r-- | target/ppc/int_helper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c index 2bad2d5620..093ef74b59 100644 --- a/target/ppc/int_helper.c +++ b/target/ppc/int_helper.c @@ -2053,7 +2053,7 @@ void helper_vsum2sws(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) for (i = 0; i < ARRAY_SIZE(r->u64); i++) { int64_t t = (int64_t)b->VsrSW(upper + i * 2); - result.VsrW(i) = 0; + result.VsrD(i) = 0; for (j = 0; j < ARRAY_SIZE(r->u64); j++) { t += a->VsrSW(2 * i + j); } |