[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 8/8] target-ppc: Bug Fix: srad
From: |
Tom Musta |
Subject: |
[Qemu-ppc] [PATCH 8/8] target-ppc: Bug Fix: srad |
Date: |
Mon, 11 Aug 2014 14:23:29 -0500 |
Fix the check for carry in the srad helper to properly construct
the mask -- a "1ULL" must be used (instead of "1") in order to
get the desired result.
Signed-off-by: Tom Musta <address@hidden>
---
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 e83a25d..e5b103b 100644
--- a/target-ppc/int_helper.c
+++ b/target-ppc/int_helper.c
@@ -248,7 +248,7 @@ target_ulong helper_srad(CPUPPCState *env, target_ulong
value,
if (likely((uint64_t)shift != 0)) {
shift &= 0x3f;
ret = (int64_t)value >> shift;
- if (likely(ret >= 0 || (value & ((1 << shift) - 1)) == 0)) {
+ if (likely(ret >= 0 || (value & ((1ULL << shift) - 1)) == 0)) {
env->ca = 0;
} else {
env->ca = 1;
--
1.7.1
- [Qemu-ppc] [PATCH 3/8] target-ppc: Bug Fix: rlwimi, (continued)
- [Qemu-ppc] [PATCH 3/8] target-ppc: Bug Fix: rlwimi, Tom Musta, 2014/08/11
- [Qemu-ppc] [PATCH 4/8] target-ppc: Bug Fix: mullw, Tom Musta, 2014/08/11
- [Qemu-ppc] [PATCH 5/8] target-ppc: Bug Fix: mullwo, Tom Musta, 2014/08/11
- [Qemu-ppc] [PATCH 6/8] target-ppc: Bug Fix: mulldo OV Detection, Tom Musta, 2014/08/11
- [Qemu-ppc] [PATCH 7/8] target-ppc: Bug Fix: srawi, Tom Musta, 2014/08/11
- [Qemu-ppc] [PATCH 8/8] target-ppc: Bug Fix: srad,
Tom Musta <=
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 0/8] target-ppc: Bug Fixes for 64 Bit FXU Instructions, David Gibson, 2014/08/11