# HG changeset patch # User chainsaw # Date 1169985092 28800 # Node ID 732f07a601bc36c89e48ebe9cf2a673365d71038 # Parent cd730d42b2bdfbe0af1371f993a96552c172162a [svn] Count leading zeroes as PPC assembler. Implemented by Joseph Jezak (JoseJX) from Gentoo. diff -r cd730d42b2bd -r 732f07a601bc ChangeLog --- 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 + 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 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. diff -r cd730d42b2bd -r 732f07a601bc src/alac/alac.c --- 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)