* [Qemu-devel] [PATCH] target-ppc: Fix Altivec Shifts
@ 2014-10-29 15:02 Tom Musta
2014-11-03 17:54 ` Alexander Graf
0 siblings, 1 reply; 2+ messages in thread
From: Tom Musta @ 2014-10-29 15:02 UTC (permalink / raw)
To: qemu-devel, qemu-ppc; +Cc: Tom Musta, agraf
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 <tommusta@gmail.com>
---
target-ppc/int_helper.c | 13 ++-----------
1 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/target-ppc/int_helper.c b/target-ppc/int_helper.c
index 713d777..eb5c6d2 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.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] target-ppc: Fix Altivec Shifts
2014-10-29 15:02 [Qemu-devel] [PATCH] target-ppc: Fix Altivec Shifts Tom Musta
@ 2014-11-03 17:54 ` Alexander Graf
0 siblings, 0 replies; 2+ messages in thread
From: Alexander Graf @ 2014-11-03 17:54 UTC (permalink / raw)
To: Tom Musta, qemu-devel, qemu-ppc
On 29.10.14 16:02, Tom Musta wrote:
> 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 <tommusta@gmail.com>
Thanks, applied to ppc-next.
Alex
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-03 17:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-29 15:02 [Qemu-devel] [PATCH] target-ppc: Fix Altivec Shifts Tom Musta
2014-11-03 17:54 ` Alexander Graf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).