aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/source
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2005-09-01 23:29:52 +0000
committerThomas Grill <xovo@users.sourceforge.net>2005-09-01 23:29:52 +0000
commitca53e316258e811cd0e13123ceaede9089804b89 (patch)
tree2ff54ec70bfef459abc6efc885b1b88eb05e5713 /externals/grill/flext/source
parenta3c221da7d4508af22adc78654f5a5bda0529027 (diff)
fixed severe Altivec bug
svn path=/trunk/; revision=3473
Diffstat (limited to 'externals/grill/flext/source')
-rwxr-xr-xexternals/grill/flext/source/flsimd.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/externals/grill/flext/source/flsimd.cpp b/externals/grill/flext/source/flsimd.cpp
index 1ed9480d..cd3b19e0 100755
--- a/externals/grill/flext/source/flsimd.cpp
+++ b/externals/grill/flext/source/flsimd.cpp
@@ -335,10 +335,11 @@ inline vector unsigned char LoadUnaligned( vector unsigned char *v )
{
vector unsigned char permuteVector = vec_lvsl( 0, (int*) v );
vector unsigned char low = vec_ld( 0, v );
- vector unsigned char high = vec_ld( 16, v );
+ vector unsigned char high = vec_ld( 15, v );
return vec_perm( low, high, permuteVector );
}
+/*
//! Store a vector to an unaligned location in memory
inline void StoreUnaligned( vector unsigned char v, vector unsigned char *where)
{
@@ -361,16 +362,19 @@ inline void StoreUnaligned( vector unsigned char v, vector unsigned char *where)
vec_st( low, 0, where );
vec_st( high, 16, where );
}
+*/
inline vector float LoadUnaligned(const float *v )
{
return (vector float)LoadUnaligned((vector unsigned char *)v);
}
+/*
inline void StoreUnaligned( vector float v,float *where)
{
return StoreUnaligned((vector unsigned char)v,(vector unsigned char *)where);
}
+*/
inline bool IsVectorAligned(const void *where)
{
@@ -403,7 +407,7 @@ inline bool VectorsAligned(const void *v1,const void *v2,const void *v3,const vo
inline vector float LoadValue(const float &f)
{
- return IsVectorAligned(&f)?vec_splat(vec_ld(0,(vector float *)&f),0):LoadUnaligned(&f);
+ return vec_splat(IsVectorAligned(&f)?vec_ld(0,(vector float *)&f):LoadUnaligned(&f),0);
}
#endif