-/* $OpenBSD: DEFS.h,v 1.2 2017/11/29 05:13:57 guenther Exp $ */
+/* $OpenBSD: DEFS.h,v 1.3 2017/12/16 09:25:43 kettenis Exp $ */
/*
* Copyright (c) 2016 Philip Guenther <guenther@openbsd.org>
*
* END_BUILTIN(x) If compiling with clang, then just END() and
* mark it .protected, else be like END_STRONG();
* for clang builtins like memcpy
+ * If a 'BUILTIN' function needs be referenced by other ASM code, then use
+ * _BUILTIN(x) If compiled with clang, then just x, otherwise
+ * _HIDDEN(x)
*/
#define END_STRONG(x) END(x); _HIDDEN_FALIAS(x,x); END(_HIDDEN(x))
#define END_WEAK(x) END_STRONG(x); .weak x
#ifdef __clang__
#define END_BUILTIN(x) END(x); .protected x
+#define _BUILTIN(x) x
#else
#define END_BUILTIN(x) END_STRONG(x)
+#define _BUILTIN(x) _HIDDEN(x)
#endif
-/* $OpenBSD: bzero.S,v 1.5 2016/08/06 19:16:09 guenther Exp $ */
+/* $OpenBSD: bzero.S,v 1.6 2017/12/16 09:25:43 kettenis Exp $ */
/* $NetBSD: bzero.S,v 1.2 2001/07/16 05:50:06 matt Exp $ */
/*-
ENTRY(bzero)
mov r2, r1
mov r1, #0
- b _HIDDEN(memset)
+ b _BUILTIN(memset)
END_WEAK(bzero)