changeset 557:732f07a601bc trunk

[svn] Count leading zeroes as PPC assembler. Implemented by Joseph Jezak (JoseJX) from Gentoo.
author chainsaw
date Sun, 28 Jan 2007 03:51:32 -0800
parents cd730d42b2bd
children 324a6d834f32
files ChangeLog src/alac/alac.c
diffstat 2 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Jan 28 02:32:41 2007 -0800
+++ b/ChangeLog	Sun Jan 28 03:51:32 2007 -0800
@@ -1,3 +1,11 @@
+2007-01-28 10:32:41 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [1198]
+  - User-Agent: Audacious/$version (curl transport)
+  
+  trunk/src/curl/curl.c |    5 +++++
+  1 file changed, 5 insertions(+)
+
+
 2007-01-28 00:37:02 +0000  Tony Vroon <chainsaw@gentoo.org>
   revision [1196]
   If we are controlling a mono mixer component, ignore balance gracefully rather than muting the audio when the slider is moved to the left.
--- a/src/alac/alac.c	Sun Jan 28 02:32:41 2007 -0800
+++ b/src/alac/alac.c	Sun Jan 28 03:51:32 2007 -0800
@@ -291,6 +291,14 @@
     }
     return output;
 }
+#elif defined (__powerpc__) || defined (__ppc__) || defined (__POWERPC__) || defined (__powerc)
+static int count_leading_zeros(int input)
+{
+	int output = 0;
+	if (!input) return 32;
+	asm("cntlzw %0, %1": "=r"(output):"r"(input));
+	return output;
+}
 #else
 #warning using generic count leading zeroes. You may wish to write one for your CPU / compiler
 static int count_leading_zeros(int input)