diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2012-04-16 15:33:36 +0200 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2012-04-16 15:52:59 +0200 |
commit | 66b586b9b9cdaf70f0fcd547b5a04f044d848d44 (patch) | |
tree | a5fd4b0f4f4f05460276af33ec2b2743d567480f /src/radeon_accel.c | |
parent | 1e656cd5973bbcf85b63406638ede0bccd65e28f (diff) |
RADEONCopySwap: Fix RADEON_HOST_DATA_SWAP_16BIT case.
It was the same code as for RADEON_HOST_DATA_SWAP_32BIT. This caused bus errors
on FreeBSD/PPC, but I'm not sure how it could not cause problems anywhere...
Reported-by: Andreas Tobler <andreast@fgznet.ch>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/radeon_accel.c')
-rw-r--r-- | src/radeon_accel.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/radeon_accel.c b/src/radeon_accel.c index 1cebcf6a..784502d8 100644 --- a/src/radeon_accel.c +++ b/src/radeon_accel.c @@ -982,10 +982,9 @@ void RADEONCopySwap(uint8_t *dst, uint8_t *src, unsigned int size, int swap) for (; nwords > 0; --nwords, ++d, ++s) #ifdef __powerpc__ - asm volatile("stwbrx %0,0,%1" : : "r" (*s), "r" (d)); + asm volatile("sthbrx %0,0,%1" : : "r" (*s), "r" (d)); #else - *d = ((*s >> 24) & 0xff) | ((*s >> 8) & 0xff00) - | ((*s & 0xff00) << 8) | ((*s & 0xff) << 24); + *d = (*s >> 8) | (*s << 8); #endif return; } |