[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 31/33] target-ppc: Fix Altivec Shifts
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PULL 31/33] target-ppc: Fix Altivec Shifts |
Date: |
Tue, 4 Nov 2014 20:26:49 +0100 |
From: Tom Musta <address@hidden>
Fix the implementation of the Altivec shift left and shift right
instructions (vsl, vsr) which erroneously inverts shift direction
on big endian hosts.
Signed-off-by: Tom Musta <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
target-ppc/int_helper.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/target-ppc/int_helper.c b/target-ppc/int_helper.c
index 1c7e0f1..12c9ab0 100644
--- a/target-ppc/int_helper.c
+++ b/target-ppc/int_helper.c
@@ -1552,13 +1552,6 @@ void helper_vlogefp(CPUPPCState *env, ppc_avr_t *r,
ppc_avr_t *b)
}
}
-#if defined(HOST_WORDS_BIGENDIAN)
-#define LEFT 0
-#define RIGHT 1
-#else
-#define LEFT 1
-#define RIGHT 0
-#endif
/* The specification says that the results are undefined if all of the
* shift counts are not identical. We check to make sure that they are
* to conform to what real hardware appears to do. */
@@ -1588,11 +1581,9 @@ void helper_vlogefp(CPUPPCState *env, ppc_avr_t *r,
ppc_avr_t *b)
} \
} \
}
-VSHIFT(l, LEFT)
-VSHIFT(r, RIGHT)
+VSHIFT(l, 1)
+VSHIFT(r, 0)
#undef VSHIFT
-#undef LEFT
-#undef RIGHT
#define VSL(suffix, element, mask) \
void helper_vsl##suffix(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) \
--
1.8.1.4
- [Qemu-ppc] [PULL 15/33] target-ppc: Fix an invalid free in opcode table handling code., (continued)
- [Qemu-ppc] [PULL 15/33] target-ppc: Fix an invalid free in opcode table handling code., Alexander Graf, 2014/11/04
- [Qemu-ppc] [PULL 26/33] sysbus: Expose MMIO enumeration helper, Alexander Graf, 2014/11/04
- [Qemu-ppc] [PULL 27/33] sysbus: Add new platform bus helper device, Alexander Graf, 2014/11/04
- [Qemu-ppc] [PULL 09/33] spapr: Cleanup machine naming conventions, and prepare for 2.2 release, Alexander Graf, 2014/11/04
- [Qemu-ppc] [PULL 20/33] target-ppc: kvm: Fix memory overflow issue about strncat(), Alexander Graf, 2014/11/04
- [Qemu-ppc] [PULL 23/33] sysbus: Add dynamic sysbus device search, Alexander Graf, 2014/11/04
- [Qemu-ppc] [PULL 30/33] target-ppc: simplify AES emulation, Alexander Graf, 2014/11/04
- [Qemu-ppc] [PULL 21/33] ppc: do not look at the MMU index to detect PR/HV mode, Alexander Graf, 2014/11/04
- [Qemu-ppc] [PULL 28/33] PPC: e500: Support dynamically spawned sysbus devices, Alexander Graf, 2014/11/04
- [Qemu-ppc] [PULL 33/33] target-ppc: Fix Altivec Round Opcodes, Alexander Graf, 2014/11/04
- [Qemu-ppc] [PULL 31/33] target-ppc: Fix Altivec Shifts,
Alexander Graf <=
- [Qemu-ppc] [PULL 25/33] sysbus: Expose IRQ enumeration helpers, Alexander Graf, 2014/11/04
- [Qemu-ppc] [PULL 29/33] e500: Add support for eTSEC in device tree, Alexander Graf, 2014/11/04
- [Qemu-ppc] [PULL 32/33] target-ppc: Fix vcmpbfp. Unordered Case, Alexander Graf, 2014/11/04
- Re: [Qemu-ppc] [PULL 2.2 00/33] ppc patch queue 2014-11-04 for 2.2, Peter Maydell, 2014/11/04
- Re: [Qemu-ppc] [PULL 2.2 00/33] ppc patch queue 2014-11-04 for 2.2, Peter Maydell, 2014/11/05