Rename function to __ffs and make ffs a weak alias.

This commit is contained in:
Ulrich Drepper 1998-03-09 09:09:46 +00:00
parent 1c03144cf7
commit b8b84ae26c
7 changed files with 15 additions and 8 deletions

View File

@ -25,7 +25,7 @@
.set noreorder
.set noat
ENTRY(ffs)
ENTRY(__ffs)
#ifdef PROF
ldgp gp, 0(pv)
lda AT, _mcount
@ -69,4 +69,5 @@ ENTRY(ffs)
$done: ret
END(ffs)
END(__ffs)
weak_alias (__ffs, ffs)

View File

@ -26,7 +26,7 @@
#ifdef __GNUC__
int
ffs (x)
__ffs (x)
int x;
{
int cnt;
@ -35,6 +35,7 @@ ffs (x)
return 32 - cnt;
}
weak_alias (__ffs, ffs)
#else
#include <sysdeps/generic/ffs.c>

View File

@ -27,7 +27,7 @@
#if defined (__GNUC__) && defined (__i960__)
int
ffs (x)
__ffs (x)
int x;
{
int cnt;
@ -36,6 +36,7 @@ ffs (x)
return cnt;
}
weak_alias (__ffs, ffs)
#else

View File

@ -26,7 +26,7 @@
#if defined (__GNUC__) && defined (__mc68020__)
int
ffs (x)
__ffs (x)
int x;
{
int cnt;
@ -35,6 +35,7 @@ ffs (x)
return 32 - cnt;
}
weak_alias (__ffs, ffs)
#else

View File

@ -26,7 +26,7 @@
#ifdef __GNUC__
int
ffs (x)
__ffs (x)
int x;
{
int cnt;
@ -37,6 +37,7 @@ ffs (x)
asm ("ff1 %0,%1" : "=r" (cnt) : "r" (x & -x));
return cnt + 1;
}
weak_alias (__ffs, ffs)
#else
#include <sysdeps/generic/ffs.c>

View File

@ -26,7 +26,7 @@
#ifdef __GNUC__
int
ffs (x)
__ffs (x)
int x;
{
int cnt;
@ -34,6 +34,7 @@ ffs (x)
asm ("cntlz %0,%1" : "=r" (cnt) : "r" (x & -x));
return 32 - cnt;
}
weak_alias (__ffs, ffs)
#else
#include <sysdeps/generic/ffs.c>

View File

@ -39,10 +39,11 @@
#include "DEFS.h"
ENTRY(ffs, 0)
ENTRY(__ffs, 0)
ffs $0,$32,4(ap),r0
bneq 1f
mnegl $1,r0
1:
incl r0
ret
weak_alias (__ffs, ffs)