-/* $OpenBSD: cerror.S,v 1.5 2012/08/22 17:19:34 pascal Exp $ */
+/* $OpenBSD: cerror.S,v 1.6 2013/12/31 23:31:13 kettenis Exp $ */
/* $NetBSD: cerror.S,v 1.5 2003/08/07 16:42:04 agc Exp $ */
/*-
WEAK_ALIAS(CERROR, _CERROR)
ASENTRY(_CERROR)
-#ifdef _REENTRANT
- stmfd sp!, {r4, lr}
- mov r4, r0
- bl PIC_SYM(_C_LABEL(__errno), PLT)
- str r4, [r0]
- mvn r0, #0x00000000
- mvn r1, #0x00000000
- ldmfd sp!, {r4, pc}
-#else
#ifdef __PIC__
/* Setup the GOT */
ldr r3, .Lgot
.Lerrno:
.word PIC_SYM(_C_LABEL(errno), GOT)
-#endif /* _REENTRANT */
-/* $OpenBSD: cerror.S,v 1.3 2012/08/22 17:19:35 pascal Exp $ */
+/* $OpenBSD: cerror.S,v 1.4 2013/12/31 23:31:13 kettenis Exp $ */
/* $NetBSD: cerror.S,v 1.10 2006/01/06 05:14:39 uwe Exp $ */
/*-
WEAK_ALIAS(CERROR, _CERROR)
ASENTRY(_CERROR)
-#ifdef _REENTRANT
- mov.l .L___errno, r1
- PIC_PROLOGUE(.L_got)
- sts.l pr, @-sp
-1: CALL r1
- mov.l r4, @-sp ! save error code
- mov.l @sp+, r4
- lds.l @sp+, pr
- PIC_EPILOGUE
- mov.l r4, @r0
- mov #-1, r1
- rts
- mov #-1, r0
-
- .align 2
-.L_got: PIC_GOT_DATUM
-.L___errno: CALL_DATUM(_C_LABEL(__errno), 1b)
- SET_ASENTRY_SIZE(_CERROR)
-
-#else /* !_REENTRANT */
#ifdef __PIC__
mova L_GOT, r0
mov.l L_GOT, r1
#else
L_errno: .long _C_LABEL(errno)
#endif
-#endif /* !_REENTRANT */