changeset 928:88bf800eba26 trunk

[svn] - use C-style vectors instead of apple's stuff
author nenolod
date Mon, 09 Apr 2007 08:50:46 -0700
parents b9cbd2e62186
children 9631824411bf
files ChangeLog src/madplug/SFMT-alti.c
diffstat 2 files changed, 13 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Apr 09 08:30:03 2007 -0700
+++ b/ChangeLog	Mon Apr 09 08:50:46 2007 -0700
@@ -1,3 +1,11 @@
+2007-04-09 15:30:03 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [1982]
+  - fix altivec implementation
+  
+  trunk/src/madplug/SFMT.c |    1 +
+  1 file changed, 1 insertion(+)
+
+
 2007-04-09 15:11:42 +0000  Tony Vroon <chainsaw@gentoo.org>
   revision [1980]
   Spell internal & pseudorandom in a consistent way. Add missing altivec.h include in SFMT-alti.h; more work to be done as it still does not build.
--- a/src/madplug/SFMT-alti.c	Mon Apr 09 08:30:03 2007 -0700
+++ b/src/madplug/SFMT-alti.c	Mon Apr 09 08:50:46 2007 -0700
@@ -11,16 +11,16 @@
 						vector unsigned int c,
 						vector unsigned int d) {
 
-    const vector unsigned int sl1 = (vector unsigned int)(SL1, SL1, SL1, SL1);
-    const vector unsigned int sr1 = (vector unsigned int)(SR1, SR1, SR1, SR1);
+    const vector unsigned int sl1 = (vector unsigned int){SL1, SL1, SL1, SL1};
+    const vector unsigned int sr1 = (vector unsigned int){SR1, SR1, SR1, SR1};
 #ifdef ONLY64
     const vector unsigned int mask = (vector unsigned int)
-    (MSK2, MSK1, MSK4, MSK3);
+    {MSK2, MSK1, MSK4, MSK3};
     const vector unsigned char perm_sl = ALTI_SL2_PERM64;
     const vector unsigned char perm_sr = ALTI_SR2_PERM64;
 #else
     const vector unsigned int mask = (vector unsigned int)
-    (MSK1, MSK2, MSK3, MSK4);
+    {MSK1, MSK2, MSK3, MSK4};
     const vector unsigned char perm_sl = ALTI_SL2_PERM;
     const vector unsigned char perm_sr = ALTI_SR2_PERM;
 #endif
@@ -117,7 +117,7 @@
 inline static void swap(w128_t array[], int size) {
     int i;
     const vector unsigned char perm = (vector unsigned char)
-	(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11);
+	{4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11};
 
     for (i = 0; i < size; i++) {
 	array[i].s = vec_perm(array[i].s, (vector unsigned int)perm, perm);