Be careful not to read past the end of the data. With aligned loads (which are every load in altivec), it is always okay to load a vector if you can access any element of that vector. It is not always okay to load the next vector.
This commit is contained in:
@@ -341,7 +341,7 @@ void Vector::FastSoundRead( int16_t *dest, const int32_t *src, unsigned size )
|
||||
{
|
||||
// Deal with the remaining samples but be careful while storing as above.
|
||||
vSInt32 first = vec_ldl( 0, src );
|
||||
vSInt32 second = vec_ldl( 16, src );
|
||||
vSInt32 second = size > 4 ? vec_ldl( 16, src ) : (vSInt32)( 0 );
|
||||
vBool32 b1 = vec_cmplt( first, zero );
|
||||
vBool32 b2 = vec_cmplt( second, zero );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user