-/* $OpenBSD: ffs.S,v 1.3 2015/08/31 02:53:56 guenther Exp $ */
+/* $OpenBSD: ffs.S,v 1.4 2018/01/18 08:23:44 guenther Exp $ */
/* $NetBSD: ffs.S,v 1.3 1996/10/17 03:08:13 cgd Exp $ */
/*
Lallzero:
bis zero, zero, v0
RET
-END_WEAK(ffs)
+END(ffs)
+.protected ffs
-/* $OpenBSD: ffs.S,v 1.4 2015/11/14 21:53:03 guenther Exp $ */
+/* $OpenBSD: ffs.S,v 1.5 2018/01/18 08:23:44 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
_ALIGN_TEXT
L1: xorl %eax,%eax /* clear result */
ret
-END_WEAK(ffs)
+END(ffs)
+.protected ffs
-/* $OpenBSD: ffs.S,v 1.6 2016/09/18 10:22:10 kettenis Exp $ */
+/* $OpenBSD: ffs.S,v 1.7 2018/01/18 08:23:44 guenther Exp $ */
/* $NetBSD: ffs.S,v 1.5 2003/04/05 23:08:52 bjh21 Exp $ */
/*
* Copyright (c) 2001 Christopher Gilbert
ldrbne r0, [ r2, r0, lsr #26 ]
mov pc, lr
-END_WEAK(ffs)
-.text;
+END(ffs)
+.protected ffs
+
+ .section .rodata
.type .L_ffs_table, _ASM_TYPE_OBJECT;
.L_ffs_table:
/* 0 1 2 3 4 5 6 7 */
-/* $OpenBSD: ffs.S,v 1.6 2017/11/29 05:13:57 guenther Exp $ */
+/* $OpenBSD: ffs.S,v 1.7 2018/01/18 08:23:44 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
.align 2,0xcc
L1: xorl %eax,%eax /* clear result */
ret
-END_WEAK(ffs)
+END(ffs)
+.protected ffs
-/* $OpenBSD: ffs.S,v 1.4 2015/08/31 02:53:56 guenther Exp $ */
+/* $OpenBSD: ffs.S,v 1.5 2018/01/18 08:23:44 guenther Exp $ */
/*-
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
beq v1, zero, 1b # no, continue
done:
j ra
-END_WEAK(ffs)
+END(ffs)
+.protected ffs
-/* $OpenBSD: ffs.S,v 1.3 2015/08/31 02:53:57 guenther Exp $ */
+/* $OpenBSD: ffs.S,v 1.4 2018/01/18 08:23:44 guenther Exp $ */
/* $NetBSD: ffs.S,v 1.1 2005/12/20 19:28:50 christos Exp $ */
/*-
Lzero: rts
nop
-END_WEAK(ffs)
+END(ffs)
+.protected ffs
-/* $OpenBSD: ffs.S,v 1.5 2015/08/31 02:53:57 guenther Exp $ */
+/* $OpenBSD: ffs.S,v 1.6 2018/01/18 08:23:44 guenther Exp $ */
/*
* Copyright (c) 1992, 1993
ldsb [%o2 + %o0], %o0
retl
add %o0, 24, %o0
-END_WEAK(ffs)
+END(ffs)
+.protected ffs
+ .section .rodata
_C_LABEL(__ffstab):
.byte -24,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1 /* 00-0f */
.byte 5,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1 /* 10-1f */
-/* $OpenBSD: string.h,v 1.5 2017/11/29 05:13:57 guenther Exp $ */
+/* $OpenBSD: string.h,v 1.6 2018/01/18 08:23:44 guenther Exp $ */
/*
* Copyright (c) 2015 Philip Guenther <guenther@openbsd.org>
*
PROTO_NORMAL(bcopy);
PROTO_NORMAL(bzero);
PROTO_NORMAL(explicit_bzero);
-PROTO_NORMAL(ffs);
+PROTO_PROTECTED(ffs);
PROTO_DEPRECATED(index);
PROTO_NORMAL(memccpy);
PROTO_NORMAL(memchr);
-/* $OpenBSD: namespace.h,v 1.11 2017/11/29 05:13:57 guenther Exp $ */
+/* $OpenBSD: namespace.h,v 1.12 2018/01/18 08:23:44 guenther Exp $ */
#ifndef _LIBC_NAMESPACE_H_
#define _LIBC_NAMESPACE_H_
#include <sys/cdefs.h> /* for __dso_hidden and __{weak,strong}_alias */
+#define __dso_protected __attribute__((__visibility__("protected")))
+
#define HIDDEN(x) _libc_##x
#define CANCEL(x) _libc_##x##_cancel
#define WRAP(x) _libc_##x##_wrap
#define PROTO_CANCEL(x) __dso_hidden typeof(x) HIDDEN(x), \
x asm(CANCEL_STRING(x))
#define PROTO_WRAP(x) PROTO_NORMAL(x), WRAP(x)
+#define PROTO_PROTECTED(x) __dso_protected typeof(x) x
#define DEF_STRONG(x) __strong_alias(x, HIDDEN(x))
#define DEF_WEAK(x) __weak_alias(x, HIDDEN(x))
#define DEF_SYS(x) __strong_alias(_thread_sys_##x, HIDDEN(x))
#ifdef __clang__
#define DEF_BUILTIN(x) __asm("")
-#define BUILTIN __attribute__((__visibility__("protected")))
+#define BUILTIN __dso_protected
#else
#define DEF_BUILTIN(x) DEF_STRONG(x)
#define BUILTIN
-/* $OpenBSD: ffs.c,v 1.9 2015/08/31 02:53:57 guenther Exp $ */
+/* $OpenBSD: ffs.c,v 1.10 2018/01/18 08:23:44 guenther Exp $ */
/*
* Public domain.
return (bit + t[ r & 0xf ]);
}
-DEF_WEAK(ffs);