From ca53e316258e811cd0e13123ceaede9089804b89 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Thu, 1 Sep 2005 23:29:52 +0000 Subject: fixed severe Altivec bug svn path=/trunk/; revision=3473 --- externals/grill/flext/buildsys/mac/gnumake-gcc-ext.inc | 4 ++++ externals/grill/flext/buildsys/mac/max/gnumake-gcc-ext.inc | 6 ++++++ externals/grill/flext/source/flsimd.cpp | 8 ++++++-- 3 files changed, 16 insertions(+), 2 deletions(-) (limited to 'externals/grill/flext') diff --git a/externals/grill/flext/buildsys/mac/gnumake-gcc-ext.inc b/externals/grill/flext/buildsys/mac/gnumake-gcc-ext.inc index d5057ed3..2f277625 100644 --- a/externals/grill/flext/buildsys/mac/gnumake-gcc-ext.inc +++ b/externals/grill/flext/buildsys/mac/gnumake-gcc-ext.inc @@ -61,6 +61,10 @@ endif endif chmod 755 $@ +ifdef TARGETPOST +$(TARGET) :: $(TARGETPOST) +endif + ############################################## _clean_: diff --git a/externals/grill/flext/buildsys/mac/max/gnumake-gcc-ext.inc b/externals/grill/flext/buildsys/mac/max/gnumake-gcc-ext.inc index de5afd04..3808d6bb 100644 --- a/externals/grill/flext/buildsys/mac/max/gnumake-gcc-ext.inc +++ b/externals/grill/flext/buildsys/mac/max/gnumake-gcc-ext.inc @@ -10,3 +10,9 @@ INSTTARGET=$(OBJPATH)/$(OUTNAME).$(EXT) TARGETPATH=$(INSTTARGET)/Contents/MacOS # file inside bundle (build site) TARGET=$(TARGETPATH)/$(OUTNAME) + +# post build target +TARGETPOST=$(INSTTARGET)/Contents/Pkginfo + +$(INSTTARGET)/Contents/Pkginfo: + echo "iLaX????" >> $@ 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 -- cgit v1.2.1