-/* $OpenBSD: divsi3.S,v 1.2 2004/02/01 05:47:10 drahn Exp $ */
+/* $OpenBSD: divsi3.S,v 1.3 2014/12/30 08:12:52 jsg Exp $ */
/* $NetBSD: divsi3.S,v 1.2 2001/11/13 20:06:40 chris Exp $ */
/*
bl L_udivide
add sp, sp, #4 /* unalign stack */
mov r0, r1
-#ifdef __APCS_26__
- ldmfd sp!, {pc}^
-#else /* APCS-32 */
ldmfd sp!, {pc}
-#endif
ENTRY(__modsi3)
stmfd sp!, {lr}
bl L_divide
add sp, sp, #4 /* unalign stack */
mov r0, r1
-#ifdef __APCS_26__
- ldmfd sp!, {pc}^
-#else
ldmfd sp!, {pc}
-#endif
L_overflow:
#if !defined(_KERNEL) && !defined(_STANDALONE)
/* XXX should cause a fatal error */
mvn r0, #0
#endif
-#ifdef __APCS_26__
- movs pc, lr
-#else
mov pc, lr
-#endif
ENTRY(__udivsi3)
L_udivide: /* r0 = r0 / r1; r1 = r0 % r1 */
L_divide_l0: /* r0 == 1 */
mov r0, r1
mov r1, #0
-#ifdef __APCS_26__
- movs pc, lr
-#else
mov pc, lr
-#endif
ENTRY(__divsi3)
L_divide: /* r0 = r0 / r1; r1 = r0 % r1 */
movs ip, ip, lsl #1
bicmi r0, r0, #0x80000000 /* Fix incase we divided 0x80000000 */
rsbmi r0, r0, #0
-#ifdef __APCS_26__
- movs pc, lr
-#else
mov pc, lr
-#endif
L_udivide_l1:
tst ip, #0x10000000
subhs r1, r1, r0
addhs r3, r3, r2
mov r0, r3
-#ifdef __APCS_26__
- movs pc, lr
-#else
mov pc, lr
-#endif
-/* $OpenBSD: htonl.S,v 1.2 2008/06/26 05:42:20 ray Exp $ */
+/* $OpenBSD: htonl.S,v 1.3 2014/12/30 08:12:52 jsg Exp $ */
/* $NetBSD: byte_swap_4.S,v 1.1 2000/12/29 20:51:57 bjh21 Exp $ */
/*-
bic r1, r1, #0x00FF0000
mov r0, r0, ror #8
eor r0, r0, r1, lsr #8
-#ifdef __APCS_26__
- movs pc,lr
-#else
mov pc, lr
-#endif
-/* $OpenBSD: htons.S,v 1.2 2008/06/26 05:42:20 ray Exp $ */
+/* $OpenBSD: htons.S,v 1.3 2014/12/30 08:12:52 jsg Exp $ */
/* $NetBSD: byte_swap_2.S,v 1.1.20.1 2002/07/02 06:50:59 lukem Exp $ */
/*-
and r1, r0, #0xff
mov r0, r0, lsr #8
orr r0, r0, r1, lsl #8
-#ifdef __APCS_26__
- movs pc, lr
-#else
mov pc, lr
-#endif
-/* $OpenBSD: memcpy.S,v 1.4 2013/06/15 19:16:53 miod Exp $ */
+/* $OpenBSD: memcpy.S,v 1.5 2014/12/30 08:12:52 jsg Exp $ */
/* $NetBSD: memcpy.S,v 1.2 2001/11/20 00:29:20 chris Exp $ */
/*-
/* Determine copy direction */
cmp r1, r0
-#ifdef __APCS_26__
- moveqs pc, lr
-#else
moveq pc, lr
-#endif
/* save leaf functions having to store this away */
stmdb sp!, {r0, lr} /* memcpy() returns dest addr */
strgeb r3, [r0], #1
ldrgtb r3, [r1], #1
strgtb r3, [r0], #1
-#ifdef __APCS_26__
- ldmia sp!, {r0, pc}^
-#else
ldmia sp!, {r0, pc}
-#endif
/* erg - unaligned destination */
Lmemcpy_fdestul:
Lmemcpy_bl4:
/* less than 4 bytes to go */
adds r2, r2, #4
-#ifdef __APCS_26__
- ldmeqia sp!, {r0, pc}^
-#else
ldmeqia sp!, {r0, pc}
-#endif
/* copy the crud byte at a time */
cmp r2, #2
strgeb r3, [r0, #-1]!
ldrgtb r3, [r1, #-1]!
strgtb r3, [r0, #-1]!
-#ifdef __APCS_26__
- ldmia sp!, {r0, pc}^
-#else
ldmia sp!, {r0, pc}
-#endif
/* erg - unaligned destination */
Lmemcpy_bdestul:
-/* $OpenBSD: memset.S,v 1.2 2004/02/01 05:47:10 drahn Exp $ */
+/* $OpenBSD: memset.S,v 1.3 2014/12/30 08:12:52 jsg Exp $ */
/* $NetBSD: memset.S,v 1.1 2000/12/29 20:51:57 bjh21 Exp $ */
/*
Lmemset_lessthanfour:
cmp r2, #0x00000000
ldmeqfd sp!, {r0}
-#ifdef __APCS_26__
- moveqs pc, lr /* Zero length so exit */
-#else
moveq pc, lr /* Zero length so exit */
-#endif
cmp r2, #0x00000002
strb r1, [r0], #0x0001 /* Set 1 byte */
strgtb r1, [r0], #0x0001 /* and a third */
ldmfd sp!, {r0}
-#ifdef __APCS_26__
- movs pc, lr /* Exit */
-#else
mov pc, lr /* Exit */
-#endif