From 7bc65dc79d97a897e81f6c6ad3b8a8a8aae728be Mon Sep 17 00:00:00 2001 From: jsg Date: Tue, 30 Dec 2014 08:12:52 +0000 Subject: [PATCH] unifdef __APCS_26__ we don't run on anything with a 26 bit program counter. This codepath was removed in the NetBSD code this is derived from back in 2003 and was removed in Bitrig earlier this year. No binary change. --- sys/lib/libkern/arch/arm/divsi3.S | 26 +------------------------- sys/lib/libkern/arch/arm/htonl.S | 6 +----- sys/lib/libkern/arch/arm/htons.S | 6 +----- sys/lib/libkern/arch/arm/memcpy.S | 18 +----------------- sys/lib/libkern/arch/arm/memset.S | 10 +--------- 5 files changed, 5 insertions(+), 61 deletions(-) diff --git a/sys/lib/libkern/arch/arm/divsi3.S b/sys/lib/libkern/arch/arm/divsi3.S index 1917e18e9c6..7a8fa816651 100644 --- a/sys/lib/libkern/arch/arm/divsi3.S +++ b/sys/lib/libkern/arch/arm/divsi3.S @@ -1,4 +1,4 @@ -/* $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 $ */ /* @@ -28,11 +28,7 @@ ENTRY(__umodsi3) 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} @@ -40,11 +36,7 @@ ENTRY(__modsi3) 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) @@ -55,11 +47,7 @@ L_overflow: /* 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 */ @@ -81,11 +69,7 @@ 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 */ @@ -389,11 +373,7 @@ L_divide_b0: 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 @@ -404,8 +384,4 @@ L_udivide_l1: subhs r1, r1, r0 addhs r3, r3, r2 mov r0, r3 -#ifdef __APCS_26__ - movs pc, lr -#else mov pc, lr -#endif diff --git a/sys/lib/libkern/arch/arm/htonl.S b/sys/lib/libkern/arch/arm/htonl.S index ebf17645d4f..2458b01cc04 100644 --- a/sys/lib/libkern/arch/arm/htonl.S +++ b/sys/lib/libkern/arch/arm/htonl.S @@ -1,4 +1,4 @@ -/* $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 $ */ /*- @@ -40,8 +40,4 @@ _PROF_PROLOGUE 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 diff --git a/sys/lib/libkern/arch/arm/htons.S b/sys/lib/libkern/arch/arm/htons.S index 9ac12e28ced..d1c3cda6eb6 100644 --- a/sys/lib/libkern/arch/arm/htons.S +++ b/sys/lib/libkern/arch/arm/htons.S @@ -1,4 +1,4 @@ -/* $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 $ */ /*- @@ -39,8 +39,4 @@ _PROF_PROLOGUE 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 diff --git a/sys/lib/libkern/arch/arm/memcpy.S b/sys/lib/libkern/arch/arm/memcpy.S index c414de79f60..998250d9968 100644 --- a/sys/lib/libkern/arch/arm/memcpy.S +++ b/sys/lib/libkern/arch/arm/memcpy.S @@ -1,4 +1,4 @@ -/* $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 $ */ /*- @@ -68,11 +68,7 @@ ENTRY_NP(memmove) /* 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 */ @@ -148,11 +144,7 @@ Lmemcpy_fl4: 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: @@ -336,11 +328,7 @@ Lmemcpy_bl12: 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 @@ -350,11 +338,7 @@ Lmemcpy_bl4: 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: diff --git a/sys/lib/libkern/arch/arm/memset.S b/sys/lib/libkern/arch/arm/memset.S index 7a41e09c9dd..1635c81f7b9 100644 --- a/sys/lib/libkern/arch/arm/memset.S +++ b/sys/lib/libkern/arch/arm/memset.S @@ -1,4 +1,4 @@ -/* $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 $ */ /* @@ -116,11 +116,7 @@ Lmemset_loop4: 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 */ @@ -128,8 +124,4 @@ Lmemset_lessthanfour: strgtb r1, [r0], #0x0001 /* and a third */ ldmfd sp!, {r0} -#ifdef __APCS_26__ - movs pc, lr /* Exit */ -#else mov pc, lr /* Exit */ -#endif -- 2.20.1