CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: mlelstv Date: Tue Jan 24 07:04:27 UTC 2023 Modified Files: src/common/lib/libc/arch/arm/string: memcpy_arm.S Log Message: Fix two signed comparisons that were missed in the last patch. Found be rillig@ To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/common/lib/libc/arch/arm/string/memcpy_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/memcpy_arm.S diff -u src/common/lib/libc/arch/arm/string/memcpy_arm.S:1.6 src/common/lib/libc/arch/arm/string/memcpy_arm.S:1.7 --- src/common/lib/libc/arch/arm/string/memcpy_arm.S:1.6 Thu Jan 19 18:03:03 2023 +++ src/common/lib/libc/arch/arm/string/memcpy_arm.S Tue Jan 24 07:04:27 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: memcpy_arm.S,v 1.6 2023/01/19 18:03:03 mlelstv Exp $ */ +/* $NetBSD: memcpy_arm.S,v 1.7 2023/01/24 07:04:27 mlelstv Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -111,8 +111,8 @@ ENTRY(memcpy) blo .Lmemcpy_l4 subs r2, r2, #4 - ldrlt r3, [r1], #4 - strlt r3, [r0], #4 + ldrlo r3, [r1], #4 + strlo r3, [r0], #4 ldmiahs r1!, {r3, r12} stmiahs r0!, {r3, r12} subhs r2, r2, #4
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: mlelstv Date: Tue Jan 24 07:04:27 UTC 2023 Modified Files: src/common/lib/libc/arch/arm/string: memcpy_arm.S Log Message: Fix two signed comparisons that were missed in the last patch. Found be rillig@ To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/common/lib/libc/arch/arm/string/memcpy_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: mlelstv Date: Thu Jan 19 18:03:03 UTC 2023 Modified Files: src/common/lib/libc/arch/arm/string: memcpy_arm.S memcpy_neon.S memcpy_xscale.S memmove.S memset.S memset_naive.S strlen_neon.S Log Message: Use unsigned comparisons for pointers and size_t values. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/arch/arm/string/memcpy_arm.S \ src/common/lib/libc/arch/arm/string/memcpy_xscale.S cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/memcpy_neon.S \ src/common/lib/libc/arch/arm/string/memset_naive.S cvs rdiff -u -r1.10 -r1.11 src/common/lib/libc/arch/arm/string/memmove.S cvs rdiff -u -r1.8 -r1.9 src/common/lib/libc/arch/arm/string/memset.S cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/string/strlen_neon.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: mlelstv Date: Thu Jan 19 18:03:03 UTC 2023 Modified Files: src/common/lib/libc/arch/arm/string: memcpy_arm.S memcpy_neon.S memcpy_xscale.S memmove.S memset.S memset_naive.S strlen_neon.S Log Message: Use unsigned comparisons for pointers and size_t values. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/arch/arm/string/memcpy_arm.S \ src/common/lib/libc/arch/arm/string/memcpy_xscale.S cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/memcpy_neon.S \ src/common/lib/libc/arch/arm/string/memset_naive.S cvs rdiff -u -r1.10 -r1.11 src/common/lib/libc/arch/arm/string/memmove.S cvs rdiff -u -r1.8 -r1.9 src/common/lib/libc/arch/arm/string/memset.S cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/string/strlen_neon.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/memcpy_arm.S diff -u src/common/lib/libc/arch/arm/string/memcpy_arm.S:1.5 src/common/lib/libc/arch/arm/string/memcpy_arm.S:1.6 --- src/common/lib/libc/arch/arm/string/memcpy_arm.S:1.5 Mon Dec 2 21:21:33 2013 +++ src/common/lib/libc/arch/arm/string/memcpy_arm.S Thu Jan 19 18:03:03 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: memcpy_arm.S,v 1.5 2013/12/02 21:21:33 joerg Exp $ */ +/* $NetBSD: memcpy_arm.S,v 1.6 2023/01/19 18:03:03 mlelstv Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ ENTRY(memcpy) push {r0, lr} /* memcpy() returns dest addr */ subs r2, r2, #4 - blt .Lmemcpy_l4 /* less than 4 bytes */ + blo .Lmemcpy_l4 /* less than 4 bytes */ ands r12, r0, #3 bne .Lmemcpy_destul /* oh unaligned destination addr */ ands r12, r1, #3 @@ -75,9 +75,9 @@ ENTRY(memcpy) .Lmemcpy_t8: /* We have aligned source and destination */ subs r2, r2, #8 - blt .Lmemcpy_l12 /* less than 12 bytes (4 from above) */ + blo .Lmemcpy_l12 /* less than 12 bytes (4 from above) */ subs r2, r2, #0x14 - blt .Lmemcpy_l32 /* less than 32 bytes (12 from above) */ + blo .Lmemcpy_l32 /* less than 32 bytes (12 from above) */ push {r4} /* borrow r4 */ /* blat 32 bytes at a time */ @@ -88,12 +88,12 @@ ENTRY(memcpy) ldmia r1!, {r3, r4, r12, lr} stmia r0!, {r3, r4, r12, lr} subs r2, r2, #0x20 - bge .Lmemcpy_loop32 + bhs .Lmemcpy_loop32 cmn r2, #0x10 - ldmiage r1!, {r3, r4, r12, lr} /* blat a remaining 16 bytes */ - stmiage r0!, {r3, r4, r12, lr} - subge r2, r2, #0x10 + ldmiahs r1!, {r3, r4, r12, lr} /* blat a remaining 16 bytes */ + stmiahs r0!, {r3, r4, r12, lr} + subhs r2, r2, #0x10 pop {r4} /* return r4 */ .Lmemcpy_l32: @@ -101,21 +101,21 @@ ENTRY(memcpy) /* blat 12 bytes at a time */ .Lmemcpy_loop12: - ldmiage r1!, {r3, r12, lr} - stmiage r0!, {r3, r12, lr} - subsge r2, r2, #0x0c - bge .Lmemcpy_loop12 + ldmiahs r1!, {r3, r12, lr} + stmiahs r0!, {r3, r12, lr} + subshs r2, r2, #0x0c + bhs .Lmemcpy_loop12 .Lmemcpy_l12: adds r2, r2, #8 - blt .Lmemcpy_l4 + blo .Lmemcpy_l4 subs r2, r2, #4 ldrlt r3, [r1], #4 strlt r3, [r0], #4 - ldmiage r1!, {r3, r12} - stmiage r0!, {r3, r12} - subge r2, r2, #4 + ldmiahs r1!, {r3, r12} + stmiahs r0!, {r3, r12} + subhs r2, r2, #4 .Lmemcpy_l4: /* less than 4 bytes to go */ @@ -129,10 +129,10 @@ ENTRY(memcpy) cmp r2, #2 ldrb r3, [r1], #1 strb r3, [r0], #1 - ldrbge r3, [r1], #1 - strbge r3, [r0], #1 - ldrbgt r3, [r1], #1 - strbgt r3, [r0], #1 + ldrbhs r3, [r1], #1 + strbhs r3, [r0], #1 + ldrbhi r3, [r1], #1 + strbhi r3, [r0], #1 pop {r0, pc} /* erg - unaligned destination */ @@ -143,12 +143,12 @@ ENTRY(memcpy) /* align destination with byte copies */ ldrb r3, [r1], #1 strb r3, [r0], #1 - ldrbge r3, [r1], #1 - strbge r3, [r0], #1 - ldrbgt r3, [r1], #1 - strbgt r3, [r0], #1 + ldrbhs r3, [r1], #1 + strbhs r3, [r0], #1 + ldrbhi r3, [r1], #1 + strbhi r3, [r0], #1 subs r2, r2, r12 - blt .Lmemcpy_l4 /* less the 4 bytes */ + blo .Lmemcpy_l4 /* less the 4 bytes */ ands r12, r1, #3 beq .Lmemcpy_t8 /* we have an aligned source */ @@ -159,10 +159,10 @@ ENTRY(memcpy) bic r1, r1, #3 ldr lr, [r1], #4 cmp r12, #2 - bgt .Lmemcpy_srcul3 + bhi .Lmemcpy_srcul3 beq .Lmemcpy_srcul2 cmp r2, #0x0c - blt .Lmemcpy_srcul1loop4 + blo .Lmemcpy_srcul1loop4 sub r2, r2, #0x0c push {r4, r5} @@ -192,10 +192,10 @@ ENTRY(memcpy) #endif stmia r0!, {r3-r5, r12} subs r2, r2, #0x10 - bge .Lmemcpy_srcul1loop16 + bhs .Lmemcpy_srcul1loop16 pop {r4, r5} adds r2, r2, #0x0c - blt .Lmemcpy_srcul1l4 + blo .Lmemcpy_srcul1l4 .Lmemcpy_srcul1loop4: #ifdef __ARMEB__ @@ -211,7 +211,7 @@ ENTRY(memcpy) #endif str r12, [r0], #4 subs r2, r2, #4 - bge .Lmemcpy_srcul1loop4 + bhs .Lmemcpy_srcul1loop4 .Lmemcpy_srcul1l4: sub r1, r1, #3 @@ -219,7 +219,7 @@ ENTRY(memcpy) .Lmemcpy_srcul2: cmp r2, #0x0c - blt .Lmemcpy_srcul2loop4 + blo .Lmemcpy_srcul2loop4 sub r2, r2, #0x0c push {r4, r5} @@ -249,10 +249,10 @@
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: skrll Date: Sun Jan 15 08:43:04 UTC 2023 Modified Files: src/common/lib/libc/arch/arm/string: strlen_arm.S Log Message: Fix strnlen with a large maxlen argument by using unsigned comparison conditions - from mlelstv. I had a similar, but not quite as good patch. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/common/lib/libc/arch/arm/string/strlen_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strlen_arm.S diff -u src/common/lib/libc/arch/arm/string/strlen_arm.S:1.10 src/common/lib/libc/arch/arm/string/strlen_arm.S:1.11 --- src/common/lib/libc/arch/arm/string/strlen_arm.S:1.10 Sat Dec 3 11:34:38 2022 +++ src/common/lib/libc/arch/arm/string/strlen_arm.S Sun Jan 15 08:43:03 2023 @@ -29,7 +29,7 @@ #include -RCSID("$NetBSD: strlen_arm.S,v 1.10 2022/12/03 11:34:38 skrll Exp $") +RCSID("$NetBSD: strlen_arm.S,v 1.11 2023/01/15 08:43:03 skrll Exp $") #if defined(__thumb__) && !defined(_ARM_ARCH_T2) #error Only Thumb2 or ARM supported @@ -102,7 +102,7 @@ ENTRY(FUNCNAME) .Lmain_loop: #ifdef STRNLEN cmp r0, r5 /* gone too far? */ - bge .Lmaxed_out /* yes, return maxlen */ + bhs .Lmaxed_out /* yes, return maxlen */ #endif ldr r3, [r0], #4 /* load next word */ #if defined(_ARM_ARCH_6) @@ -164,9 +164,9 @@ ENTRY(FUNCNAME) #ifdef STRNLEN cmp r0, r4 /* is it larger than maxlen? */ #ifdef __thumb__ - it gt + it hi #endif - movgt r0, r4 /* yes, return maxlen */ + movhi r0, r4 /* yes, return maxlen */ pop {r4, r5} /* restore registers */ #endif RET/* return */
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: skrll Date: Sun Jan 15 08:43:04 UTC 2023 Modified Files: src/common/lib/libc/arch/arm/string: strlen_arm.S Log Message: Fix strnlen with a large maxlen argument by using unsigned comparison conditions - from mlelstv. I had a similar, but not quite as good patch. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/common/lib/libc/arch/arm/string/strlen_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: skrll Date: Sat Dec 3 11:34:38 UTC 2022 Modified Files: src/common/lib/libc/arch/arm/string: strlen_arm.S Log Message: Fix some comments To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/common/lib/libc/arch/arm/string/strlen_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strlen_arm.S diff -u src/common/lib/libc/arch/arm/string/strlen_arm.S:1.9 src/common/lib/libc/arch/arm/string/strlen_arm.S:1.10 --- src/common/lib/libc/arch/arm/string/strlen_arm.S:1.9 Tue May 6 16:02:11 2014 +++ src/common/lib/libc/arch/arm/string/strlen_arm.S Sat Dec 3 11:34:38 2022 @@ -29,7 +29,7 @@ #include -RCSID("$NetBSD: strlen_arm.S,v 1.9 2014/05/06 16:02:11 joerg Exp $") +RCSID("$NetBSD: strlen_arm.S,v 1.10 2022/12/03 11:34:38 skrll Exp $") #if defined(__thumb__) && !defined(_ARM_ARCH_T2) #error Only Thumb2 or ARM supported @@ -121,9 +121,9 @@ ENTRY(FUNCNAME) * (other tests for NULs in a word take more instructions/cycles). */ tst r3, #BYTE0 /* is this byte 0? */ - tstne r3, #BYTE1 /* no, is this byte 0? */ - tstne r3, #BYTE2 /* no, is this byte 0? */ - tstne r3, #BYTE3 /* no, is this byte 0? */ + tstne r3, #BYTE1 /* no, is this byte 1? */ + tstne r3, #BYTE2 /* no, is this byte 2? */ + tstne r3, #BYTE3 /* no, is this byte 3? */ bne .Lmain_loop /* no, then get next word */ #endif #if defined(_ARM_ARCH_6)
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: skrll Date: Sat Dec 3 11:34:38 UTC 2022 Modified Files: src/common/lib/libc/arch/arm/string: strlen_arm.S Log Message: Fix some comments To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/common/lib/libc/arch/arm/string/strlen_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: skrll Date: Sat Dec 3 11:30:24 UTC 2022 Modified Files: src/common/lib/libc/arch/arm/string: strlen_naive.S Log Message: improve a comment To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/common/lib/libc/arch/arm/string/strlen_naive.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strlen_naive.S diff -u src/common/lib/libc/arch/arm/string/strlen_naive.S:1.8 src/common/lib/libc/arch/arm/string/strlen_naive.S:1.9 --- src/common/lib/libc/arch/arm/string/strlen_naive.S:1.8 Mon Aug 19 17:02:25 2013 +++ src/common/lib/libc/arch/arm/string/strlen_naive.S Sat Dec 3 11:30:24 2022 @@ -28,7 +28,7 @@ */ #include -RCSID("$NetBSD: strlen_naive.S,v 1.8 2013/08/19 17:02:25 matt Exp $") +RCSID("$NetBSD: strlen_naive.S,v 1.9 2022/12/03 11:30:24 skrll Exp $") #ifdef STRNLEN /* LINTSTUB: size_t strnlen(const char *, size_t) */ @@ -40,7 +40,7 @@ ENTRY(strnlen) #else adds ip, r0, r1 /* [maxlen] */ #endif -1: cmp r0, ip /* is this of string? */ +1: cmp r0, ip /* is this the end of string? */ beq 2f /* yes it is */ #ifdef __thumb__ ldrb r2, [r0] /* read a byte */
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: skrll Date: Sat Dec 3 11:30:24 UTC 2022 Modified Files: src/common/lib/libc/arch/arm/string: strlen_naive.S Log Message: improve a comment To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/common/lib/libc/arch/arm/string/strlen_naive.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: skrll Date: Thu Apr 13 07:49:52 UTC 2017 Modified Files: src/common/lib/libc/arch/arm/string: memmove.S Log Message: Comment alignment. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/common/lib/libc/arch/arm/string/memmove.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: skrll Date: Thu Apr 13 07:49:52 UTC 2017 Modified Files: src/common/lib/libc/arch/arm/string: memmove.S Log Message: Comment alignment. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/common/lib/libc/arch/arm/string/memmove.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/memmove.S diff -u src/common/lib/libc/arch/arm/string/memmove.S:1.9 src/common/lib/libc/arch/arm/string/memmove.S:1.10 --- src/common/lib/libc/arch/arm/string/memmove.S:1.9 Thu Mar 26 13:34:51 2015 +++ src/common/lib/libc/arch/arm/string/memmove.S Thu Apr 13 07:49:52 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: memmove.S,v 1.9 2015/03/26 13:34:51 justin Exp $ */ +/* $NetBSD: memmove.S,v 1.10 2017/04/13 07:49:52 skrll Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -64,7 +64,7 @@ ENTRY(bcopy) ands r12, r0, #3 bne .Lmemmove_fdestul /* oh unaligned destination addr */ ands r12, r1, #3 - bne .Lmemmove_fsrcul /* oh unaligned source addr */ + bne .Lmemmove_fsrcul /* oh unaligned source addr */ .Lmemmove_ft8: /* We have aligned source and destination */
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: christos Date: Sat Jan 14 04:54:42 UTC 2017 Modified Files: src/common/lib/libc/arch/arm/string: strcpy_naive.S Log Message: fix standalone To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/common/lib/libc/arch/arm/string/strcpy_naive.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: christos Date: Sat Jan 14 04:54:42 UTC 2017 Modified Files: src/common/lib/libc/arch/arm/string: strcpy_naive.S Log Message: fix standalone To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/common/lib/libc/arch/arm/string/strcpy_naive.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strcpy_naive.S diff -u src/common/lib/libc/arch/arm/string/strcpy_naive.S:1.7 src/common/lib/libc/arch/arm/string/strcpy_naive.S:1.8 --- src/common/lib/libc/arch/arm/string/strcpy_naive.S:1.7 Fri Jan 13 23:53:25 2017 +++ src/common/lib/libc/arch/arm/string/strcpy_naive.S Fri Jan 13 23:54:42 2017 @@ -28,7 +28,7 @@ */ #include -RCSID("$NetBSD: strcpy_naive.S,v 1.7 2017/01/14 04:53:25 christos Exp $") +RCSID("$NetBSD: strcpy_naive.S,v 1.8 2017/01/14 04:54:42 christos Exp $") #ifdef _LIBC #ifdef STRLCPY @@ -82,12 +82,12 @@ ENTRY(strncpy) END(strncpy) #else /* LINTSTUB: char * strcpy(char *, const char *) */ -ENTRY(_strcpy) +ENTRY(strcpy) mov ip, r0 /* we want to preserve r0 */ 1: ldrb r3, [r1], #1 /* read a byte */ strb r3, [ip], #1 /* write a byte */ teq r3, #0 /* was it a NUL? */ bne 1b /* no, try next byte */ RET/* return dst pointer */ -END(_strcpy) +END(strcpy) #endif
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: christos Date: Sat Jan 14 04:53:25 UTC 2017 Modified Files: src/common/lib/libc/arch/arm/string: strcpy_naive.S Log Message: fix standalone To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/common/lib/libc/arch/arm/string/strcpy_naive.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: christos Date: Sat Jan 14 04:53:25 UTC 2017 Modified Files: src/common/lib/libc/arch/arm/string: strcpy_naive.S Log Message: fix standalone To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/common/lib/libc/arch/arm/string/strcpy_naive.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strcpy_naive.S diff -u src/common/lib/libc/arch/arm/string/strcpy_naive.S:1.6 src/common/lib/libc/arch/arm/string/strcpy_naive.S:1.7 --- src/common/lib/libc/arch/arm/string/strcpy_naive.S:1.6 Fri Jan 13 22:35:21 2017 +++ src/common/lib/libc/arch/arm/string/strcpy_naive.S Fri Jan 13 23:53:25 2017 @@ -28,7 +28,7 @@ */ #include -RCSID("$NetBSD: strcpy_naive.S,v 1.6 2017/01/14 03:35:21 christos Exp $") +RCSID("$NetBSD: strcpy_naive.S,v 1.7 2017/01/14 04:53:25 christos Exp $") #ifdef _LIBC #ifdef STRLCPY @@ -66,7 +66,7 @@ ENTRY(strlcpy) END(strlcpy) #elif defined(STRNCPY) /* LINTSTUB: char * strncpy(char *, const char *, size_t) */ -ENTRY(_strncpy) +ENTRY(strncpy) mov ip, r0 /* we want to preserve r0 */ add r2, r2, r0 /* get end of dst buffer */ 1: cmp ip, r2 /* are at the end of dst already? */ @@ -79,7 +79,7 @@ ENTRY(_strncpy) strblt r3, [ip], #1 /* no, write a NUL */ blt 2b /* until dst is filled */ 3: RET/* return dst pointer */ -END(_strncpy) +END(strncpy) #else /* LINTSTUB: char * strcpy(char *, const char *) */ ENTRY(_strcpy)
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: christos Date: Sat Jan 14 03:35:21 UTC 2017 Modified Files: src/common/lib/libc/arch/arm/string: strcpy_arm.S strcpy_naive.S Log Message: fix rump To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/arch/arm/string/strcpy_arm.S \ src/common/lib/libc/arch/arm/string/strcpy_naive.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: christos Date: Sat Jan 14 03:35:21 UTC 2017 Modified Files: src/common/lib/libc/arch/arm/string: strcpy_arm.S strcpy_naive.S Log Message: fix rump To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/arch/arm/string/strcpy_arm.S \ src/common/lib/libc/arch/arm/string/strcpy_naive.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strcpy_arm.S diff -u src/common/lib/libc/arch/arm/string/strcpy_arm.S:1.5 src/common/lib/libc/arch/arm/string/strcpy_arm.S:1.6 --- src/common/lib/libc/arch/arm/string/strcpy_arm.S:1.5 Fri Jan 13 22:00:13 2017 +++ src/common/lib/libc/arch/arm/string/strcpy_arm.S Fri Jan 13 22:35:21 2017 @@ -29,19 +29,29 @@ #include -RCSID("$NetBSD: strcpy_arm.S,v 1.5 2017/01/14 03:00:13 christos Exp $") +RCSID("$NetBSD: strcpy_arm.S,v 1.6 2017/01/14 03:35:21 christos Exp $") #ifdef STRLCPY #ifdef _LIBC WEAK_ALIAS(strlcpy, _strlcpy) -#endif -#define FUNCNAME _strlcpy +# define FUNCNAME _strlcpy +# else +# define FUNCNAME strlcpy +# endif #elif defined(STRNCPY) +# ifdef _LIBC WEAK_ALIAS(strncpy, _strncpy) -#define FUNCNAME _strncpy +# define FUNCNAME _strncpy +# else +# define FUNCNAME strncpy +# endif #else +# ifdef _LIBC WEAK_ALIAS(strcpy, _strcpy) -#define FUNCNAME _strcpy +# define FUNCNAME _strcpy +# else +# define FUNCNAME strcpy +# endif #endif #ifdef __ARMEL__ Index: src/common/lib/libc/arch/arm/string/strcpy_naive.S diff -u src/common/lib/libc/arch/arm/string/strcpy_naive.S:1.5 src/common/lib/libc/arch/arm/string/strcpy_naive.S:1.6 --- src/common/lib/libc/arch/arm/string/strcpy_naive.S:1.5 Fri Jan 13 08:14:54 2017 +++ src/common/lib/libc/arch/arm/string/strcpy_naive.S Fri Jan 13 22:35:21 2017 @@ -28,11 +28,12 @@ */ #include -RCSID("$NetBSD: strcpy_naive.S,v 1.5 2017/01/13 13:14:54 christos Exp $") +RCSID("$NetBSD: strcpy_naive.S,v 1.6 2017/01/14 03:35:21 christos Exp $") #ifdef _LIBC #ifdef STRLCPY WEAK_ALIAS(strlcpy, _strlcpy) +#define strlcpy _strlcpy #endif #endif @@ -43,7 +44,7 @@ WEAK_ALIAS(strlcpy, _strlcpy) #if defined(STRLCPY) /* LINTSTUB: size_t strlcpy(char *, const char *, size_t) */ -ENTRY(_strlcpy) +ENTRY(strlcpy) add ip, r1, #1 /* save src pointer (+ NUL) */ subs r2, r2, #1 /* make sure there's room for a NUL */ blt 3f /* no room, do the strlen */ @@ -62,7 +63,7 @@ ENTRY(_strlcpy) bne 3b /* no, get next byte */ 4: sub r0, r1, ip /* return length of src string */ RET -END(_strlcpy) +END(strlcpy) #elif defined(STRNCPY) /* LINTSTUB: char * strncpy(char *, const char *, size_t) */ ENTRY(_strncpy)
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: christos Date: Sat Jan 14 03:00:13 UTC 2017 Modified Files: src/common/lib/libc/arch/arm/string: strcpy_arm.S strcpy_thumb.S strlcat.S Log Message: fix weak symbols. More work needs to be done for memcpy/strlen etc. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/string/strcpy_arm.S cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/string/strcpy_thumb.S cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/string/strlcat.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strcpy_arm.S diff -u src/common/lib/libc/arch/arm/string/strcpy_arm.S:1.4 src/common/lib/libc/arch/arm/string/strcpy_arm.S:1.5 --- src/common/lib/libc/arch/arm/string/strcpy_arm.S:1.4 Fri Jan 13 08:14:54 2017 +++ src/common/lib/libc/arch/arm/string/strcpy_arm.S Fri Jan 13 22:00:13 2017 @@ -29,7 +29,7 @@ #include -RCSID("$NetBSD: strcpy_arm.S,v 1.4 2017/01/13 13:14:54 christos Exp $") +RCSID("$NetBSD: strcpy_arm.S,v 1.5 2017/01/14 03:00:13 christos Exp $") #ifdef STRLCPY #ifdef _LIBC @@ -37,8 +37,10 @@ WEAK_ALIAS(strlcpy, _strlcpy) #endif #define FUNCNAME _strlcpy #elif defined(STRNCPY) +WEAK_ALIAS(strncpy, _strncpy) #define FUNCNAME _strncpy #else +WEAK_ALIAS(strcpy, _strcpy) #define FUNCNAME _strcpy #endif Index: src/common/lib/libc/arch/arm/string/strcpy_thumb.S diff -u src/common/lib/libc/arch/arm/string/strcpy_thumb.S:1.2 src/common/lib/libc/arch/arm/string/strcpy_thumb.S:1.3 --- src/common/lib/libc/arch/arm/string/strcpy_thumb.S:1.2 Fri Jan 13 08:14:54 2017 +++ src/common/lib/libc/arch/arm/string/strcpy_thumb.S Fri Jan 13 22:00:13 2017 @@ -28,11 +28,20 @@ */ #include -RCSID("$NetBSD: strcpy_thumb.S,v 1.2 2017/01/13 13:14:54 christos Exp $") +RCSID("$NetBSD: strcpy_thumb.S,v 1.3 2017/01/14 03:00:13 christos Exp $") #ifdef _LIBC #ifdef STRLCPY -WEAK_ALIAS(strlcpy, _strlcpy) +WEAK_ALIAS(strlcpy, _strlcpy) +#define strlcpy _strlcpy +#endif +#ifdef STRNCPY +WEAK_ALIAS(strncpy, _strncpy) +#define strncpy _strncpy +#endif +#ifdef STRCPY +WEAK_ALIAS(strcpy, _strcpy) +#define strcpy _strcpy #endif #endif @@ -43,7 +52,7 @@ WEAK_ALIAS(strlcpy, _strlcpy) #if defined(STRLCPY) /* LINTSTUB: size_t strlcpy(char *, const char *, size_t) */ -ENTRY(_strlcpy) +ENTRY(strlcpy) adds r3, r1, #1 /* save src pointer (+ NUL) */ subs r2, r2, #1 /* make sure there's room for a NUL */ blt 3f /* no room, do the strlen */ @@ -65,10 +74,10 @@ ENTRY(_strlcpy) bne 3b /* no, get next byte */ 4: subs r0, r1, r3 /* return length of src string */ RET -END(_strlcpy) +END(strlcpy) #elif defined(STRNCPY) /* LINTSTUB: char * strncpy(char *, const char *, size_t) */ -ENTRY(_strncpy) +ENTRY(strncpy) mov ip, r0 /* we want to preserve r0 */ adds r2, r2, r0 /* get end of dst buffer */ subs r1, r1, r0 /* allows to only increment once */ @@ -86,10 +95,10 @@ ENTRY(_strncpy) b 2b /* until dst is filled */ 3: mov r0, ip /* return dst pointer */ RET -END(_strncpy) +END(strncpy) #else /* LINTSTUB: char * strcpy(char *, const char *) */ -ENTRY(_strcpy) +ENTRY(strcpy) subs r2, r0, r1 /* we want to preserve r0 */ 1: ldrb r3, [r1] /* read a byte */ strb r3, [r2, r1] /* write a byte */ @@ -97,5 +106,5 @@ ENTRY(_strcpy) cmp r3, #0 /* was it a NUL? */ bne 1b /* no, try next byte */ RET/* return dst pointer */ -END(_strcpy) +END(strcpy) #endif Index: src/common/lib/libc/arch/arm/string/strlcat.S diff -u src/common/lib/libc/arch/arm/string/strlcat.S:1.3 src/common/lib/libc/arch/arm/string/strlcat.S:1.4 --- src/common/lib/libc/arch/arm/string/strlcat.S:1.3 Fri Jan 13 08:14:54 2017 +++ src/common/lib/libc/arch/arm/string/strlcat.S Fri Jan 13 22:00:13 2017 @@ -1,9 +1,10 @@ -/* $NetBSD: strlcat.S,v 1.3 2017/01/13 13:14:54 christos Exp $ */ +/* $NetBSD: strlcat.S,v 1.4 2017/01/14 03:00:13 christos Exp $ */ #include #ifdef _LIBC WEAK_ALIAS(strlcat, _strlcat) +#define strlcat _strlcat #endif #if defined(_STANDALONE) && 0 /* arm version is always smaller */
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: christos Date: Sat Jan 14 03:00:13 UTC 2017 Modified Files: src/common/lib/libc/arch/arm/string: strcpy_arm.S strcpy_thumb.S strlcat.S Log Message: fix weak symbols. More work needs to be done for memcpy/strlen etc. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/string/strcpy_arm.S cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/string/strcpy_thumb.S cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/string/strlcat.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: christos Date: Fri Jan 13 13:14:54 UTC 2017 Modified Files: src/common/lib/libc/arch/arm/string: strcpy_arm.S strcpy_naive.S strcpy_thumb.S strlcat.S Log Message: No need to include namespace.h; no other assembly code does. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/string/strcpy_arm.S cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/string/strcpy_naive.S cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/strcpy_thumb.S cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/string/strlcat.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strcpy_arm.S diff -u src/common/lib/libc/arch/arm/string/strcpy_arm.S:1.3 src/common/lib/libc/arch/arm/string/strcpy_arm.S:1.4 --- src/common/lib/libc/arch/arm/string/strcpy_arm.S:1.3 Sun Aug 11 00:56:32 2013 +++ src/common/lib/libc/arch/arm/string/strcpy_arm.S Fri Jan 13 08:14:54 2017 @@ -29,21 +29,17 @@ #include -RCSID("$NetBSD: strcpy_arm.S,v 1.3 2013/08/11 04:56:32 matt Exp $") +RCSID("$NetBSD: strcpy_arm.S,v 1.4 2017/01/13 13:14:54 christos Exp $") #ifdef STRLCPY #ifdef _LIBC WEAK_ALIAS(strlcpy, _strlcpy) #endif -#define FUNCNAME strlcpy +#define FUNCNAME _strlcpy #elif defined(STRNCPY) -#define FUNCNAME strncpy +#define FUNCNAME _strncpy #else -#define FUNCNAME strcpy -#endif - -#ifdef _LIBC -#include "namespace.h" +#define FUNCNAME _strcpy #endif #ifdef __ARMEL__ Index: src/common/lib/libc/arch/arm/string/strcpy_naive.S diff -u src/common/lib/libc/arch/arm/string/strcpy_naive.S:1.4 src/common/lib/libc/arch/arm/string/strcpy_naive.S:1.5 --- src/common/lib/libc/arch/arm/string/strcpy_naive.S:1.4 Tue Aug 20 17:37:39 2013 +++ src/common/lib/libc/arch/arm/string/strcpy_naive.S Fri Jan 13 08:14:54 2017 @@ -28,13 +28,12 @@ */ #include -RCSID("$NetBSD: strcpy_naive.S,v 1.4 2013/08/20 21:37:39 matt Exp $") +RCSID("$NetBSD: strcpy_naive.S,v 1.5 2017/01/13 13:14:54 christos Exp $") #ifdef _LIBC #ifdef STRLCPY WEAK_ALIAS(strlcpy, _strlcpy) #endif -#include "namespace.h" #endif /* @@ -44,7 +43,7 @@ WEAK_ALIAS(strlcpy, _strlcpy) #if defined(STRLCPY) /* LINTSTUB: size_t strlcpy(char *, const char *, size_t) */ -ENTRY(strlcpy) +ENTRY(_strlcpy) add ip, r1, #1 /* save src pointer (+ NUL) */ subs r2, r2, #1 /* make sure there's room for a NUL */ blt 3f /* no room, do the strlen */ @@ -63,10 +62,10 @@ ENTRY(strlcpy) bne 3b /* no, get next byte */ 4: sub r0, r1, ip /* return length of src string */ RET -END(strlcpy) +END(_strlcpy) #elif defined(STRNCPY) /* LINTSTUB: char * strncpy(char *, const char *, size_t) */ -ENTRY(strncpy) +ENTRY(_strncpy) mov ip, r0 /* we want to preserve r0 */ add r2, r2, r0 /* get end of dst buffer */ 1: cmp ip, r2 /* are at the end of dst already? */ @@ -79,15 +78,15 @@ ENTRY(strncpy) strblt r3, [ip], #1 /* no, write a NUL */ blt 2b /* until dst is filled */ 3: RET/* return dst pointer */ -END(strncpy) +END(_strncpy) #else /* LINTSTUB: char * strcpy(char *, const char *) */ -ENTRY(strcpy) +ENTRY(_strcpy) mov ip, r0 /* we want to preserve r0 */ 1: ldrb r3, [r1], #1 /* read a byte */ strb r3, [ip], #1 /* write a byte */ teq r3, #0 /* was it a NUL? */ bne 1b /* no, try next byte */ RET/* return dst pointer */ -END(strcpy) +END(_strcpy) #endif Index: src/common/lib/libc/arch/arm/string/strcpy_thumb.S diff -u src/common/lib/libc/arch/arm/string/strcpy_thumb.S:1.1 src/common/lib/libc/arch/arm/string/strcpy_thumb.S:1.2 --- src/common/lib/libc/arch/arm/string/strcpy_thumb.S:1.1 Tue Aug 20 17:32:50 2013 +++ src/common/lib/libc/arch/arm/string/strcpy_thumb.S Fri Jan 13 08:14:54 2017 @@ -28,13 +28,12 @@ */ #include -RCSID("$NetBSD: strcpy_thumb.S,v 1.1 2013/08/20 21:32:50 matt Exp $") +RCSID("$NetBSD: strcpy_thumb.S,v 1.2 2017/01/13 13:14:54 christos Exp $") #ifdef _LIBC #ifdef STRLCPY WEAK_ALIAS(strlcpy, _strlcpy) #endif -#include "namespace.h" #endif /* @@ -44,7 +43,7 @@ WEAK_ALIAS(strlcpy, _strlcpy) #if defined(STRLCPY) /* LINTSTUB: size_t strlcpy(char *, const char *, size_t) */ -ENTRY(strlcpy) +ENTRY(_strlcpy) adds r3, r1, #1 /* save src pointer (+ NUL) */ subs r2, r2, #1 /* make sure there's room for a NUL */ blt 3f /* no room, do the strlen */ @@ -66,10 +65,10 @@ ENTRY(strlcpy) bne 3b /* no, get next byte */ 4: subs r0, r1, r3 /* return length of src string */ RET -END(strlcpy) +END(_strlcpy) #elif defined(STRNCPY) /* LINTSTUB: char * strncpy(char *, const char *, size_t) */ -ENTRY(strncpy) +ENTRY(_strncpy) mov ip, r0 /* we want to preserve r0 */ adds r2, r2, r0 /* get end of dst buffer */ subs r1, r1, r0 /* allows to only increment once */ @@ -87,10 +86,10 @@ ENTRY(strncpy) b 2b /* until
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: christos Date: Fri Jan 13 13:14:54 UTC 2017 Modified Files: src/common/lib/libc/arch/arm/string: strcpy_arm.S strcpy_naive.S strcpy_thumb.S strlcat.S Log Message: No need to include namespace.h; no other assembly code does. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/string/strcpy_arm.S cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/string/strcpy_naive.S cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/strcpy_thumb.S cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/string/strlcat.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: joerg Date: Sun Jun 7 11:41:59 UTC 2015 Modified Files: src/common/lib/libc/arch/arm/string: memcpy.S Log Message: Add ARM EABI aliases for aligned arguments. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/common/lib/libc/arch/arm/string/memcpy.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/memcpy.S diff -u src/common/lib/libc/arch/arm/string/memcpy.S:1.7 src/common/lib/libc/arch/arm/string/memcpy.S:1.8 --- src/common/lib/libc/arch/arm/string/memcpy.S:1.7 Thu Mar 26 13:34:51 2015 +++ src/common/lib/libc/arch/arm/string/memcpy.S Sun Jun 7 11:41:59 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: memcpy.S,v 1.7 2015/03/26 13:34:51 justin Exp $ */ +/* $NetBSD: memcpy.S,v 1.8 2015/06/07 11:41:59 joerg Exp $ */ #include arm/cdefs.h @@ -10,4 +10,6 @@ #if defined(__ARM_EABI__) !defined(_RUMPKERNEL) STRONG_ALIAS(__aeabi_memcpy, memcpy) +STRONG_ALIAS(__aeabi_memcpy4, memcpy) +STRONG_ALIAS(__aeabi_memcpy8, memcpy) #endif
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: joerg Date: Sun Jun 7 11:41:59 UTC 2015 Modified Files: src/common/lib/libc/arch/arm/string: memcpy.S Log Message: Add ARM EABI aliases for aligned arguments. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/common/lib/libc/arch/arm/string/memcpy.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: justin Date: Sun May 17 22:14:38 UTC 2015 Modified Files: src/common/lib/libc/arch/arm/string: ffs.S Log Message: It is just the __ffssi2 alias we do not want in rump kernel To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/common/lib/libc/arch/arm/string/ffs.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/ffs.S diff -u src/common/lib/libc/arch/arm/string/ffs.S:1.8 src/common/lib/libc/arch/arm/string/ffs.S:1.9 --- src/common/lib/libc/arch/arm/string/ffs.S:1.8 Sun May 17 20:57:12 2015 +++ src/common/lib/libc/arch/arm/string/ffs.S Sun May 17 22:14:38 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ffs.S,v 1.8 2015/05/17 20:57:12 justin Exp $ */ +/* $NetBSD: ffs.S,v 1.9 2015/05/17 22:14:38 justin Exp $ */ /* * Copyright (c) 2001 Christopher Gilbert * All rights reserved. @@ -30,7 +30,7 @@ #include machine/asm.h -RCSID($NetBSD: ffs.S,v 1.8 2015/05/17 20:57:12 justin Exp $) +RCSID($NetBSD: ffs.S,v 1.9 2015/05/17 22:14:38 justin Exp $) /* * ffs - find first set bit, this algorithm isolates the first set @@ -46,6 +46,7 @@ RCSID($NetBSD: ffs.S,v 1.8 2015/05/17 2 */ #ifndef _RUMPKERNEL STRONG_ALIAS(__ffssi2,ffs) +#endif #if (defined(_ARM_ARCH_5) !defined(__thumb__)) || defined(_ARM_ARCH_T2) #if defined(_ARM_ARCH_T2) ENTRY(ffs) @@ -91,4 +92,3 @@ ARM_ENTRY(ffs) .byte 30, 0, 23, 19, 29, 18, 17, 0 /* 56-63 */ END(ffs) #endif -#endif /* _RUMPKERNEL */
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: justin Date: Sun May 17 22:14:38 UTC 2015 Modified Files: src/common/lib/libc/arch/arm/string: ffs.S Log Message: It is just the __ffssi2 alias we do not want in rump kernel To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/common/lib/libc/arch/arm/string/ffs.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: justin Date: Thu Mar 26 13:34:51 UTC 2015 Modified Files: src/common/lib/libc/arch/arm/string: memcmp.S memcpy.S memmove.S memset.S Log Message: Don't build the __eabi_ aliases in the arm rump kernel. These are provided by libc in userspace, so leave out of kernel To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/string/memcmp.S cvs rdiff -u -r1.6 -r1.7 src/common/lib/libc/arch/arm/string/memcpy.S cvs rdiff -u -r1.8 -r1.9 src/common/lib/libc/arch/arm/string/memmove.S cvs rdiff -u -r1.7 -r1.8 src/common/lib/libc/arch/arm/string/memset.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/memcmp.S diff -u src/common/lib/libc/arch/arm/string/memcmp.S:1.4 src/common/lib/libc/arch/arm/string/memcmp.S:1.5 --- src/common/lib/libc/arch/arm/string/memcmp.S:1.4 Mon Dec 2 21:21:33 2013 +++ src/common/lib/libc/arch/arm/string/memcmp.S Thu Mar 26 13:34:51 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: memcmp.S,v 1.4 2013/12/02 21:21:33 joerg Exp $ */ +/* $NetBSD: memcmp.S,v 1.5 2015/03/26 13:34:51 justin Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -64,7 +64,7 @@ #include machine/asm.h -RCSID($NetBSD: memcmp.S,v 1.4 2013/12/02 21:21:33 joerg Exp $) +RCSID($NetBSD: memcmp.S,v 1.5 2015/03/26 13:34:51 justin Exp $) ENTRY(memcmp) mov ip, r0 @@ -180,6 +180,6 @@ ENTRY(memcmp) #endif END(memcmp) -#if defined(__ARM_EABI__) +#if defined(__ARM_EABI__) !defined(_RUMPKERNEL) STRONG_ALIAS(__aeabi_memcmp, memcmp) #endif Index: src/common/lib/libc/arch/arm/string/memcpy.S diff -u src/common/lib/libc/arch/arm/string/memcpy.S:1.6 src/common/lib/libc/arch/arm/string/memcpy.S:1.7 --- src/common/lib/libc/arch/arm/string/memcpy.S:1.6 Mon Dec 2 21:21:33 2013 +++ src/common/lib/libc/arch/arm/string/memcpy.S Thu Mar 26 13:34:51 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: memcpy.S,v 1.6 2013/12/02 21:21:33 joerg Exp $ */ +/* $NetBSD: memcpy.S,v 1.7 2015/03/26 13:34:51 justin Exp $ */ #include arm/cdefs.h @@ -8,6 +8,6 @@ #include memcpy_xscale.S #endif -#if defined(__ARM_EABI__) +#if defined(__ARM_EABI__) !defined(_RUMPKERNEL) STRONG_ALIAS(__aeabi_memcpy, memcpy) #endif Index: src/common/lib/libc/arch/arm/string/memmove.S diff -u src/common/lib/libc/arch/arm/string/memmove.S:1.8 src/common/lib/libc/arch/arm/string/memmove.S:1.9 --- src/common/lib/libc/arch/arm/string/memmove.S:1.8 Mon Dec 2 21:21:33 2013 +++ src/common/lib/libc/arch/arm/string/memmove.S Thu Mar 26 13:34:51 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: memmove.S,v 1.8 2013/12/02 21:21:33 joerg Exp $ */ +/* $NetBSD: memmove.S,v 1.9 2015/03/26 13:34:51 justin Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -585,7 +585,7 @@ END(memmove) END(bcopy) #endif -#if defined(__ARM_EABI__) !defined(BCOPY) +#if defined(__ARM_EABI__) !defined(BCOPY) !defined(_RUMPKERNEL) STRONG_ALIAS(__aeabi_memmove, memmove) STRONG_ALIAS(__aeabi_memmove4, memmove) STRONG_ALIAS(__aeabi_memmove8, memmove) Index: src/common/lib/libc/arch/arm/string/memset.S diff -u src/common/lib/libc/arch/arm/string/memset.S:1.7 src/common/lib/libc/arch/arm/string/memset.S:1.8 --- src/common/lib/libc/arch/arm/string/memset.S:1.7 Mon Dec 2 21:21:33 2013 +++ src/common/lib/libc/arch/arm/string/memset.S Thu Mar 26 13:34:51 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: memset.S,v 1.7 2013/12/02 21:21:33 joerg Exp $ */ +/* $NetBSD: memset.S,v 1.8 2015/03/26 13:34:51 justin Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -68,7 +68,7 @@ #include machine/asm.h -#if defined(__ARM_EABI__) !defined(_BZERO) +#if defined(__ARM_EABI__) !defined(_BZERO) !defined(_RUMPKERNEL) ENTRY(__aeabi_memset) mov r3, r1 mov r1, r2
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: justin Date: Thu Mar 26 13:34:51 UTC 2015 Modified Files: src/common/lib/libc/arch/arm/string: memcmp.S memcpy.S memmove.S memset.S Log Message: Don't build the __eabi_ aliases in the arm rump kernel. These are provided by libc in userspace, so leave out of kernel To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/string/memcmp.S cvs rdiff -u -r1.6 -r1.7 src/common/lib/libc/arch/arm/string/memcpy.S cvs rdiff -u -r1.8 -r1.9 src/common/lib/libc/arch/arm/string/memmove.S cvs rdiff -u -r1.7 -r1.8 src/common/lib/libc/arch/arm/string/memset.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: martin Date: Thu Jan 23 11:45:46 UTC 2014 Modified Files: src/common/lib/libc/arch/arm/string: ffs.S Log Message: PR port-arm/48543: do provide __ffssi2 as strong alias (in case libgcc.a gets not linked in) for now. OK: skrll@ To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/common/lib/libc/arch/arm/string/ffs.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/ffs.S diff -u src/common/lib/libc/arch/arm/string/ffs.S:1.6 src/common/lib/libc/arch/arm/string/ffs.S:1.7 --- src/common/lib/libc/arch/arm/string/ffs.S:1.6 Mon Sep 30 13:07:51 2013 +++ src/common/lib/libc/arch/arm/string/ffs.S Thu Jan 23 11:45:46 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ffs.S,v 1.6 2013/09/30 13:07:51 skrll Exp $ */ +/* $NetBSD: ffs.S,v 1.7 2014/01/23 11:45:46 martin Exp $ */ /* * Copyright (c) 2001 Christopher Gilbert * All rights reserved. @@ -30,7 +30,7 @@ #include machine/asm.h -RCSID($NetBSD: ffs.S,v 1.6 2013/09/30 13:07:51 skrll Exp $) +RCSID($NetBSD: ffs.S,v 1.7 2014/01/23 11:45:46 martin Exp $) /* * ffs - find first set bit, this algorithm isolates the first set @@ -44,7 +44,7 @@ RCSID($NetBSD: ffs.S,v 1.6 2013/09/30 1 * This is the ffs algorithm devised by d.seal and posted to comp.sys.arm on * 16 Feb 1994. */ -WEAK_ALIAS(__ffssi2,ffs) +STRONG_ALIAS(__ffssi2,ffs) #if (defined(_ARM_ARCH_5) !defined(__thumb__)) || defined(_ARM_ARCH_T2) #if defined(_ARM_ARCH_T2) ENTRY(ffs)
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: martin Date: Thu Jan 23 11:45:46 UTC 2014 Modified Files: src/common/lib/libc/arch/arm/string: ffs.S Log Message: PR port-arm/48543: do provide __ffssi2 as strong alias (in case libgcc.a gets not linked in) for now. OK: skrll@ To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/common/lib/libc/arch/arm/string/ffs.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: skrll Date: Mon Sep 30 12:31:27 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: ffs.S Log Message: Appease new gas To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/string/ffs.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/ffs.S diff -u src/common/lib/libc/arch/arm/string/ffs.S:1.4 src/common/lib/libc/arch/arm/string/ffs.S:1.5 --- src/common/lib/libc/arch/arm/string/ffs.S:1.4 Mon Aug 19 02:55:19 2013 +++ src/common/lib/libc/arch/arm/string/ffs.S Mon Sep 30 12:31:27 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ffs.S,v 1.4 2013/08/19 02:55:19 matt Exp $ */ +/* $NetBSD: ffs.S,v 1.5 2013/09/30 12:31:27 skrll Exp $ */ /* * Copyright (c) 2001 Christopher Gilbert * All rights reserved. @@ -30,7 +30,7 @@ #include machine/asm.h -RCSID($NetBSD: ffs.S,v 1.4 2013/08/19 02:55:19 matt Exp $) +RCSID($NetBSD: ffs.S,v 1.5 2013/09/30 12:31:27 skrll Exp $) /* * ffs - find first set bit, this algorithm isolates the first set @@ -73,7 +73,7 @@ ARM_ENTRY(ffs) rsbne r0, r0, r0, lsl #16 /* r0 = X * 0x0450fbaf */ /* now lookup in table indexed on top 6 bits of r0 */ - ldrbne r0, [ r2, r0, lsr #26 ] + ldrbne r0, [r2, r0, lsr #26 ] RET .text;
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: skrll Date: Mon Sep 30 13:07:51 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: ffs.S Log Message: More (stylistic) whitespace. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/arch/arm/string/ffs.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/ffs.S diff -u src/common/lib/libc/arch/arm/string/ffs.S:1.5 src/common/lib/libc/arch/arm/string/ffs.S:1.6 --- src/common/lib/libc/arch/arm/string/ffs.S:1.5 Mon Sep 30 12:31:27 2013 +++ src/common/lib/libc/arch/arm/string/ffs.S Mon Sep 30 13:07:51 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ffs.S,v 1.5 2013/09/30 12:31:27 skrll Exp $ */ +/* $NetBSD: ffs.S,v 1.6 2013/09/30 13:07:51 skrll Exp $ */ /* * Copyright (c) 2001 Christopher Gilbert * All rights reserved. @@ -30,7 +30,7 @@ #include machine/asm.h -RCSID($NetBSD: ffs.S,v 1.5 2013/09/30 12:31:27 skrll Exp $) +RCSID($NetBSD: ffs.S,v 1.6 2013/09/30 13:07:51 skrll Exp $) /* * ffs - find first set bit, this algorithm isolates the first set @@ -73,7 +73,7 @@ ARM_ENTRY(ffs) rsbne r0, r0, r0, lsl #16 /* r0 = X * 0x0450fbaf */ /* now lookup in table indexed on top 6 bits of r0 */ - ldrbne r0, [r2, r0, lsr #26 ] + ldrbne r0, [r2, r0, lsr #26] RET .text;
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: skrll Date: Mon Sep 30 12:31:27 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: ffs.S Log Message: Appease new gas To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/string/ffs.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: skrll Date: Mon Sep 30 13:07:51 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: ffs.S Log Message: More (stylistic) whitespace. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/arch/arm/string/ffs.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Thu Sep 5 05:15:47 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strcat_arm.S strlcat_arm.S strlen_arm.S Log Message: Use __ARM_EABI__ and new __UNWIND_TABLES__ to decide when to use .cfi ops To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/string/strcat_arm.S \ src/common/lib/libc/arch/arm/string/strlcat_arm.S cvs rdiff -u -r1.7 -r1.8 src/common/lib/libc/arch/arm/string/strlen_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strcat_arm.S diff -u src/common/lib/libc/arch/arm/string/strcat_arm.S:1.4 src/common/lib/libc/arch/arm/string/strcat_arm.S:1.5 --- src/common/lib/libc/arch/arm/string/strcat_arm.S:1.4 Thu Aug 22 19:25:00 2013 +++ src/common/lib/libc/arch/arm/string/strcat_arm.S Thu Sep 5 05:15:47 2013 @@ -33,12 +33,12 @@ * Implementation of strcat using strlen/strcpy. */ ENTRY(strcat) -#if defined(__ARM_EABI__) (!defined(_KERNEL) !defined(_STANDALONE)) +#if defined(__ARM_EABI__) defined(__UNWIND_TABLES__) .fnstart .cfi_startproc #endif push {r3-r5, lr} /* save registers */ -#if defined(__ARM_EABI__) (!defined(_KERNEL) !defined(_STANDALONE)) +#if defined(__ARM_EABI__) defined(__UNWIND_TABLES__) .save {r3-r5, lr} .cfi_def_cfa_offset 16 .cfi_offset 14, -4 @@ -58,7 +58,7 @@ ENTRY(strcat) mov r0, r4 /* restore dst as return value */ pop {r3-r5, pc} /* restore registers */ -#if defined(__ARM_EABI__) (!defined(_KERNEL) !defined(_STANDALONE)) +#if defined(__ARM_EABI__) defined(__UNWIND_TABLES__) .cfi_endproc .fnend #endif Index: src/common/lib/libc/arch/arm/string/strlcat_arm.S diff -u src/common/lib/libc/arch/arm/string/strlcat_arm.S:1.4 src/common/lib/libc/arch/arm/string/strlcat_arm.S:1.5 --- src/common/lib/libc/arch/arm/string/strlcat_arm.S:1.4 Thu Aug 22 19:25:00 2013 +++ src/common/lib/libc/arch/arm/string/strlcat_arm.S Thu Sep 5 05:15:47 2013 @@ -29,16 +29,16 @@ #include machine/asm.h -RCSID($NetBSD: strlcat_arm.S,v 1.4 2013/08/22 19:25:00 matt Exp $) +RCSID($NetBSD: strlcat_arm.S,v 1.5 2013/09/05 05:15:47 matt Exp $) /* LINTSTUB: size_t strlcat(char *, const char *, size_t) */ ENTRY(strlcat) -#if defined(__ARM_EABI__) (!defined(_KERNEL) !defined(_STANDALONE)) +#if defined(__ARM_EABI__) defined(__UNWIND_TABLES__) .fnstart .cfi_startproc #endif push {r4-r6, lr} -#if defined(__ARM_EABI__) (!defined(_KERNEL) !defined(_STANDALONE)) +#if defined(__ARM_EABI__) defined(__UNWIND_TABLES__) .save {r4-r6, lr} .cfi_def_cfa_offset 16 .cfi_offset 14, -4 @@ -60,7 +60,7 @@ ENTRY(strlcat) bl PLT_SYM(strlcpy) /* attempt to copy src */ adds r0, r0, r5 /* add remaining to strlcpy return */ pop {r4-r6, pc} /* restore registers and return */ -#if defined(__ARM_EABI__) (!defined(_KERNEL) !defined(_STANDALONE)) +#if defined(__ARM_EABI__) defined(__UNWIND_TABLES__) .cfi_endproc .fnend #endif Index: src/common/lib/libc/arch/arm/string/strlen_arm.S diff -u src/common/lib/libc/arch/arm/string/strlen_arm.S:1.7 src/common/lib/libc/arch/arm/string/strlen_arm.S:1.8 --- src/common/lib/libc/arch/arm/string/strlen_arm.S:1.7 Thu Aug 22 19:25:00 2013 +++ src/common/lib/libc/arch/arm/string/strlen_arm.S Thu Sep 5 05:15:47 2013 @@ -29,7 +29,7 @@ #include machine/asm.h -RCSID($NetBSD: strlen_arm.S,v 1.7 2013/08/22 19:25:00 matt Exp $) +RCSID($NetBSD: strlen_arm.S,v 1.8 2013/09/05 05:15:47 matt Exp $) #if defined(__thumb__) !defined(_ARM_ARCH_T2) #error Only Thumb2 or ARM supported @@ -55,13 +55,13 @@ RCSID($NetBSD: strlen_arm.S,v 1.7 2013/ .text ENTRY(FUNCNAME) -#if defined(__ARM_EABI__) (!defined(_KERNEL) !defined(_STANDALONE)) +#if defined(__ARM_EABI__) defined(__UNWIND_TABLES__) .fnstart .cfi_startproc #endif #ifdef STRNLEN push {r4,r5} /* save some registers */ -#if defined(__ARM_EABI__) (!defined(_KERNEL) !defined(_STANDALONE)) +#if defined(__ARM_EABI__) defined(__UNWIND_TABLES__) .save {r4,r5} .cfi_def_cfa_offset 8 .cfi_offset 5, -4 @@ -173,7 +173,7 @@ ENTRY(FUNCNAME) pop {r4, r5} /* restore registers */ RET/* return */ #endif -#if defined(__ARM_EABI__) (!defined(_KERNEL) !defined(_STANDALONE)) +#if defined(__ARM_EABI__) defined(__UNWIND_TABLES__) .cfi_endproc .fnend #endif
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Thu Sep 5 05:15:47 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strcat_arm.S strlcat_arm.S strlen_arm.S Log Message: Use __ARM_EABI__ and new __UNWIND_TABLES__ to decide when to use .cfi ops To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/string/strcat_arm.S \ src/common/lib/libc/arch/arm/string/strlcat_arm.S cvs rdiff -u -r1.7 -r1.8 src/common/lib/libc/arch/arm/string/strlen_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Sun Aug 25 06:15:06 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strrchr_arm.S Log Message: move a misplaced #endif To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/arch/arm/string/strrchr_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strrchr_arm.S diff -u src/common/lib/libc/arch/arm/string/strrchr_arm.S:1.5 src/common/lib/libc/arch/arm/string/strrchr_arm.S:1.6 --- src/common/lib/libc/arch/arm/string/strrchr_arm.S:1.5 Tue Aug 20 08:05:49 2013 +++ src/common/lib/libc/arch/arm/string/strrchr_arm.S Sun Aug 25 06:15:06 2013 @@ -29,7 +29,7 @@ #include machine/asm.h -RCSID($NetBSD: strrchr_arm.S,v 1.5 2013/08/20 08:05:49 matt Exp $) +RCSID($NetBSD: strrchr_arm.S,v 1.6 2013/08/25 06:15:06 matt Exp $) #ifdef __ARMEL__ #define BYTE0 0x00ff @@ -64,8 +64,8 @@ ENTRY(strrchr) cmp r3, r2 /* did it match? */ #ifdef __thumb__ it eq - subeq r0, r1, #1 /* yes, remember that it did */ #endif + subeq r0, r1, #1 /* yes, remember that it did */ cmp r3, #0 /* was it NUL? */ bne 2b /* no, try next byte */ RET/* return */
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Sun Aug 25 06:15:06 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strrchr_arm.S Log Message: move a misplaced #endif To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/arch/arm/string/strrchr_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Tue Aug 20 08:06:30 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strlen_arm.S Log Message: thumbify (part2) To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/string/strlen_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strlen_arm.S diff -u src/common/lib/libc/arch/arm/string/strlen_arm.S:1.4 src/common/lib/libc/arch/arm/string/strlen_arm.S:1.5 --- src/common/lib/libc/arch/arm/string/strlen_arm.S:1.4 Mon Aug 19 01:17:32 2013 +++ src/common/lib/libc/arch/arm/string/strlen_arm.S Tue Aug 20 08:06:30 2013 @@ -29,7 +29,11 @@ #include machine/asm.h -RCSID($NetBSD: strlen_arm.S,v 1.4 2013/08/19 01:17:32 matt Exp $) +RCSID($NetBSD: strlen_arm.S,v 1.5 2013/08/20 08:06:30 matt Exp $) + +#if defined(__thumb__) !defined(_ARM_ARCH_T2) +#error Only Thumb2 or ARM supported +#endif #ifdef __ARMEL__ #define BYTE0 0x00ff @@ -63,10 +67,10 @@ ENTRY(FUNCNAME) .cfi_offset 5, -4 .cfi_offset 4, -8 #endif - add r5, r0, r1 /* get ptr to end of string */ + adds r5, r0, r1 /* get ptr to end of string */ mov r4, r1 /* save maxlen */ #endif - add ip, r0, #4 /* for the final post-inc */ + adds r2, r0, #4 /* for the final post-inc */ 1: tst r0, #3 /* test for word alignment */ beq .Lpre_main_loop /* finally word aligned */ #ifdef STRNLEN @@ -74,10 +78,10 @@ ENTRY(FUNCNAME) beq .Lmaxed_out /* yes, return maxlen */ #endif ldrb r3, [r0], #1 /* load a byte */ - teq r3, #0 /* is it 0? */ + cmp r3, #0 /* is it 0? */ bne 1b /* no, try next byte */ - sub ip, ip, #3 /* subtract (4 - the NUL) */ - sub r0, r0, ip /* subtract start */ + subs r2, r2, #3 /* subtract (4 - the NUL) */ + subs r0, r0, r2 /* subtract start */ #ifdef STRNLEN pop {r4, r5} /* restore registers */ #endif @@ -127,7 +131,12 @@ ENTRY(FUNCNAME) rev r3, r3 /* we want this in BE for the CLZ */ #endif clz r3, r3 /* count how many leading zeros */ +#ifdef __thumb__ + lsrs r3, r3, #3 + adds r0, r0, r3 /* divide that by 8 and add to count */ +#else add r0, r0, r3, lsr #3 /* divide that by 8 and add to count */ +#endif #else /* * We encountered a NUL. @@ -147,7 +156,7 @@ ENTRY(FUNCNAME) * start of the string (which also has 4 added to it to compensate for * the post-inc. */ - sub r0, r0, ip /* subtract start to get length */ + subs r0, r0, r2 /* subtract start to get length */ #ifdef STRNLEN cmp r0, r4 /* is it larger than maxlen? */ movgt r0, r4 /* yes, return maxlen */
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Tue Aug 20 08:05:49 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strrchr_arm.S Log Message: swap r1 ip use adds, eors, etc. teq - cmp To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/string/strrchr_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strrchr_arm.S diff -u src/common/lib/libc/arch/arm/string/strrchr_arm.S:1.4 src/common/lib/libc/arch/arm/string/strrchr_arm.S:1.5 --- src/common/lib/libc/arch/arm/string/strrchr_arm.S:1.4 Sun Aug 11 04:56:32 2013 +++ src/common/lib/libc/arch/arm/string/strrchr_arm.S Tue Aug 20 08:05:49 2013 @@ -29,7 +29,7 @@ #include machine/asm.h -RCSID($NetBSD: strrchr_arm.S,v 1.4 2013/08/11 04:56:32 matt Exp $) +RCSID($NetBSD: strrchr_arm.S,v 1.5 2013/08/20 08:05:49 matt Exp $) #ifdef __ARMEL__ #define BYTE0 0x00ff @@ -37,49 +37,52 @@ RCSID($NetBSD: strrchr_arm.S,v 1.4 2013 #define BYTE2 0x00ff #define BYTE3 0xff00 #define lshi lsl +#define lshis lsls #else #define BYTE0 0xff00 #define BYTE1 0x00ff #define BYTE2 0xff00 #define BYTE3 0x00ff #define lshi lsr +#define lshis lsrs #endif - .text ENTRY(strrchr) - teq r1, #0 /* searching for NUL? */ + ands r2, r1, #0xff /* is the byte value NUL? */ bne 1f /* no, do it the hard way */ push {r0, lr} /* save pointer and return addr */ bl PLT_SYM(strlen) /* get length */ - pop {r1, lr} /* restore pointer and returna addr */ - add r0, r0, r1 /* add pointer to length */ - RET/* return */ + pop {r1, r2} /* restore pointer / return addr */ + adds r0, r0, r1 /* add pointer to length */ + RETr(r2) /* return */ -1: mov ip, r0 /* we use r0 at the return value */ - mov r0, #0 /* return NULL by default */ - and r2, r1, #0xff /* restrict to byte value */ -2: tst ip, #3 /* test for word alignment */ +1: mov r1, r0 /* we use r0 at the return value */ + movs r0, #0 /* return NULL by default */ +2: tst r1, #3 /* test for word alignment */ beq .Lpre_main_loop /* finally word aligned */ - ldrb r3, [ip], #1 /* load a byte */ + ldrb r3, [r1], #1 /* load a byte */ cmp r3, r2 /* did it match? */ - subeq r0, ip, #1 /* yes, remember that it did */ - teq r3, #0 /* was it NUL? */ +#ifdef __thumb__ + it eq + subeq r0, r1, #1 /* yes, remember that it did */ +#endif + cmp r3, #0 /* was it NUL? */ bne 2b /* no, try next byte */ RET/* return */ .Lpre_main_loop: push {r4, r5} /* save some registers */ #if defined(_ARM_ARCH_7) - movw r1, #0xfefe /* magic constant; 254 in each byte */ - movt r1, #0xfefe /* magic constant; 254 in each byte */ + movw ip, #0xfefe /* magic constant; 254 in each byte */ + movt ip, #0xfefe /* magic constant; 254 in each byte */ #elif defined(_ARM_ARCH_6) - mov r1, #0xfe /* put 254 in low byte */ - orr r1, r1, r1, lsl #8 /* move to next byte */ - orr r1, r1, r1, lsl #16 /* move to next halfword */ + mov ip, #0xfe /* put 254 in low byte */ + orr ip, ip, ip, lsl #8 /* move to next byte */ + orr ip, ip, ip, lsl #16 /* move to next halfword */ #endif /* _ARM_ARCH_6 */ orr r2, r2, r2, lsl #8 /* move to next byte */ orr r2, r2, r2, lsl #16 /* move to next halfword */ .Lmain_loop: - ldr r3, [ip], #4 /* load next word */ + ldr r3, [r1], #4 /* load next word */ #if defined(_ARM_ARCH_6) /* * Add 254 to each byte using the UQADD8 (unsigned saturating add 8) @@ -87,10 +90,10 @@ ENTRY(strrchr) * become 255. For NUL, it will be 254. When we complement the * result, if the result is non-0 then we must have encountered a NUL. */ - uqadd8 r4, r3, r1 /* NUL detection happens here */ + uqadd8 r4, r3, ip /* NUL detection happens here */ usub8 r3, r3, r2 /* bias for char looked for? */ - uqadd8 r5, r3, r1 /* char detection happens here */ - and r3, r4, r5 /* merge results */ + uqadd8 r5, r3, ip /* char detection happens here */ + ands r3, r4, r5 /* merge results */ mvns r3, r3 /* is the complement non-0? */ beq .Lmain_loop /* no, then keep going */ @@ -104,7 +107,10 @@ ENTRY(strrchr) */ bics r5, r5, r4 /* clear any NUL match bits */ beq .Ldone /* no remaining matches, we're done */ - movs r3, r4, lshi #8 /* shift up a byte */ + lshis r3, r4, #8 /* shift up a byte */ +#ifdef __thumb__ + itt ne +#endif orrsne r3, r3, r3, lshi #8 /* if non 0, copy up to next byte */ orrsne r3, r3, r3, lshi #8 /* if non 0, copy up to last byte */ bics r5, r5, r3 /* clear match bits */ @@ -117,13 +123,13 @@ ENTRY(strrchr) * If we have multiple matches, we want to the select the last match * in the word which will be the lowest bit set. */ - sub r3, r5, #1 /* subtract 1 */ - and r3, r3, r5 /* and with mask */ - eor r5, r5, r3 /* only have the lowest bit set left */ + subs r3, r5, #1 /* subtract 1 */ + ands r3, r3, r5 /* and
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Tue Aug 20 08:07:30 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strchr.S strlen.S strrchr.S Log Message: Use the arm versions of strlen/strchr/strrchr if compiling thumb2 To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/string/strchr.S \ src/common/lib/libc/arch/arm/string/strlen.S \ src/common/lib/libc/arch/arm/string/strrchr.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strchr.S diff -u src/common/lib/libc/arch/arm/string/strchr.S:1.3 src/common/lib/libc/arch/arm/string/strchr.S:1.4 --- src/common/lib/libc/arch/arm/string/strchr.S:1.3 Mon Aug 19 01:08:29 2013 +++ src/common/lib/libc/arch/arm/string/strchr.S Tue Aug 20 08:07:30 2013 @@ -1,10 +1,10 @@ -/* $NetBSD: strchr.S,v 1.3 2013/08/19 01:08:29 matt Exp $ */ +/* $NetBSD: strchr.S,v 1.4 2013/08/20 08:07:30 matt Exp $ */ #include machine/asm.h STRONG_ALIAS(index, strchr) -#if defined(_STANDALONE) || defined(__thumb__) +#if defined(_STANDALONE) || (defined(__thumb__) !defined(_ARM_ARCH_T2)) #include strchr_naive.S #else #include strchr_arm.S Index: src/common/lib/libc/arch/arm/string/strlen.S diff -u src/common/lib/libc/arch/arm/string/strlen.S:1.3 src/common/lib/libc/arch/arm/string/strlen.S:1.4 --- src/common/lib/libc/arch/arm/string/strlen.S:1.3 Mon Aug 19 01:08:29 2013 +++ src/common/lib/libc/arch/arm/string/strlen.S Tue Aug 20 08:07:30 2013 @@ -1,6 +1,8 @@ -/* $NetBSD: strlen.S,v 1.3 2013/08/19 01:08:29 matt Exp $ */ +/* $NetBSD: strlen.S,v 1.4 2013/08/20 08:07:30 matt Exp $ */ -#if defined(_STANDALONE) || defined(__thumb__) +#include arm/cdefs.h + +#if defined(_STANDALONE) || (defined(__thumb__) !defined(_ARM_ARCH_T2)) #include strlen_naive.S #else #include strlen_arm.S Index: src/common/lib/libc/arch/arm/string/strrchr.S diff -u src/common/lib/libc/arch/arm/string/strrchr.S:1.3 src/common/lib/libc/arch/arm/string/strrchr.S:1.4 --- src/common/lib/libc/arch/arm/string/strrchr.S:1.3 Mon Aug 19 01:08:29 2013 +++ src/common/lib/libc/arch/arm/string/strrchr.S Tue Aug 20 08:07:30 2013 @@ -1,10 +1,10 @@ -/* $NetBSD: strrchr.S,v 1.3 2013/08/19 01:08:29 matt Exp $ */ +/* $NetBSD: strrchr.S,v 1.4 2013/08/20 08:07:30 matt Exp $ */ #include machine/asm.h STRONG_ALIAS(rindex, strrchr) -#if defined(_STANDALONE) || defined(__thumb__) +#if defined(_STANDALONE) || (defined(__thumb__) !defined(_ARM_ARCH_T2)) #include strrchr_naive.S #else #include strrchr_arm.S
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Tue Aug 20 08:08:59 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strnlen.S Log Message: Use the arm versions of strnlen if compiling thumb2 To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/string/strnlen.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strnlen.S diff -u src/common/lib/libc/arch/arm/string/strnlen.S:1.2 src/common/lib/libc/arch/arm/string/strnlen.S:1.3 --- src/common/lib/libc/arch/arm/string/strnlen.S:1.2 Mon Aug 19 01:08:29 2013 +++ src/common/lib/libc/arch/arm/string/strnlen.S Tue Aug 20 08:08:59 2013 @@ -1,8 +1,10 @@ -/* $NetBSD: strnlen.S,v 1.2 2013/08/19 01:08:29 matt Exp $ */ +/* $NetBSD: strnlen.S,v 1.3 2013/08/20 08:08:59 matt Exp $ */ + +#include arm/cdefs.h /* for _ARM_ARCH_T2 */ #define STRNLEN -#if defined(_STANDALONE) || defined(__thumb__) +#if defined(_STANDALONE) || (defined(__thumb__) !defined(_ARM_ARCH_T2)) #include strlen_naive.S #else #include strlen_arm.S
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Tue Aug 20 16:34:47 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strlen_arm.S Log Message: Add a missing it gt before movgt for thumb To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/arch/arm/string/strlen_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strlen_arm.S diff -u src/common/lib/libc/arch/arm/string/strlen_arm.S:1.5 src/common/lib/libc/arch/arm/string/strlen_arm.S:1.6 --- src/common/lib/libc/arch/arm/string/strlen_arm.S:1.5 Tue Aug 20 08:06:30 2013 +++ src/common/lib/libc/arch/arm/string/strlen_arm.S Tue Aug 20 16:34:47 2013 @@ -29,7 +29,7 @@ #include machine/asm.h -RCSID($NetBSD: strlen_arm.S,v 1.5 2013/08/20 08:06:30 matt Exp $) +RCSID($NetBSD: strlen_arm.S,v 1.6 2013/08/20 16:34:47 matt Exp $) #if defined(__thumb__) !defined(_ARM_ARCH_T2) #error Only Thumb2 or ARM supported @@ -159,6 +159,9 @@ ENTRY(FUNCNAME) subs r0, r0, r2 /* subtract start to get length */ #ifdef STRNLEN cmp r0, r4 /* is it larger than maxlen? */ +#ifdef __thumb__ + it gt +#endif movgt r0, r4 /* yes, return maxlen */ pop {r4, r5} /* restore registers */ #endif
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Tue Aug 20 21:08:54 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strlcat.S Log Message: strlcat_arm.S is smaller than strlcat_naive.S so always use it. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/strlcat.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strlcat.S diff -u src/common/lib/libc/arch/arm/string/strlcat.S:1.1 src/common/lib/libc/arch/arm/string/strlcat.S:1.2 --- src/common/lib/libc/arch/arm/string/strlcat.S:1.1 Wed Jan 23 07:56:09 2013 +++ src/common/lib/libc/arch/arm/string/strlcat.S Tue Aug 20 21:08:54 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: strlcat.S,v 1.1 2013/01/23 07:56:09 matt Exp $ */ +/* $NetBSD: strlcat.S,v 1.2 2013/08/20 21:08:54 matt Exp $ */ #include machine/asm.h @@ -7,7 +7,7 @@ WEAK_ALIAS(strlcat, _strlcat) #include namespace.h #endif -#ifdef _STANDALONE +#if defined(_STANDALONE) 0 /* arm version is always smaller */ #include strlcat_naive.S #else #include strlcat_arm.S
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Tue Aug 20 21:32:50 UTC 2013 Added Files: src/common/lib/libc/arch/arm/string: strcpy_thumb.S Log Message: Thumb versions of strcpy/strlcpy/strncpy To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/common/lib/libc/arch/arm/string/strcpy_thumb.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/common/lib/libc/arch/arm/string/strcpy_thumb.S diff -u /dev/null src/common/lib/libc/arch/arm/string/strcpy_thumb.S:1.1 --- /dev/null Tue Aug 20 21:32:50 2013 +++ src/common/lib/libc/arch/arm/string/strcpy_thumb.S Tue Aug 20 21:32:50 2013 @@ -0,0 +1,102 @@ +/*- + * Copyright (c) 2013 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Matt Thomas of 3am Software Foundry. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#include machine/asm.h + +RCSID($NetBSD: strcpy_thumb.S,v 1.1 2013/08/20 21:32:50 matt Exp $) + +#ifdef _LIBC +#ifdef STRLCPY +WEAK_ALIAS(strlcpy, _strlcpy) +#endif +#include namespace.h +#endif + +/* + * These are naive versions of the str*cpy routines designed to be simple + * and small. + */ + +#if defined(STRLCPY) +/* LINTSTUB: size_t strlcpy(char *, const char *, size_t) */ +ENTRY(strlcpy) + adds r3, r1, #1 /* save src pointer (+ NUL) */ + subs r2, r2, #1 /* make sure there's room for a NUL */ + blt 3f /* no room, do the strlen */ + adds r2, r2, r0 /* get end of dst */ + subs r0, r0, r1 /* bias against r1 so one incr */ +1: cmp r0, r2 /* room for another char? */ + beq 2f /* no, write NUL and do the strlen */ + ldrb r3, [r1] /* read a byte */ + strb r3, [r0, r1] /* write a byte */ + adds r1, r1, #1 /* advance to next byte */ + cmp r3, #0 /* was it a NUL? */ + bne 1b /* no, do next byte */ + b 4f /* yes, end of string, so return */ +2: movs r3, #0 /* NUL */ + strb r3, [r0] /* write to end of string */ +3: ldrb r3, [r1] /* read a byte */ + adds r1, r1, #1 /* advance to next byte */ + cmp r3, #0 /* was it a NUL? */ + bne 3b /* no, get next byte */ +4: subs r0, r1, r3 /* return length of src string */ + RET +END(strlcpy) +#elif defined(STRNCPY) +/* LINTSTUB: char * strncpy(char *, const char *, size_t) */ +ENTRY(strncpy) + mov ip, r0 /* we want to preserve r0 */ + adds r2, r2, r0 /* get end of dst buffer */ + subs r1, r1, r0 /* allows to only increment once */ +1: cmp r0, r2 /* are at the end of dst already? */ + beq 3f /* yes, just return. */ + ldrb r3, [r1, r0] /* read a byte */ + strb r3, [r0] /* write a byte */ + adds r0, r0, #1 /* advance a byte */ + cmp r3, #0 /* was it a NUL? */ + bne 1b /* no, try next byte */ +2: cmp r0, r2 /* are at the end of dst already? */ + beq 3f /* yes, exit loop + strb r3, [r0] /* write a NUL */ + adds r0, r0, #1 /* advance a bytes */ + b 2b /* until dst is filled */ +3: mov r0, ip /* return dst pointer */ + RET +END(strncpy) +#else +/* LINTSTUB: char * strcpy(char *, const char *) */ +ENTRY(strcpy) + subs r2, r0, r1 /* we want to preserve r0 */ +1: ldrb r3, [r1] /* read a byte */ + strb r3, [r2, r1] /* write a byte */ + adds r1, r1, #1 /* advance to next byte */ + cmp r3, #0 /* was it a NUL? */ + bne 1b /* no, try next byte */ + RET/* return dst pointer */ +END(strcpy) +#endif
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Tue Aug 20 21:35:24 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strcpy.S strlcpy.S strncpy.S Log Message: If compiling standalone with Thumb, use the thumb version instead of the naive version. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/string/strcpy.S \ src/common/lib/libc/arch/arm/string/strlcpy.S cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/string/strncpy.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strcpy.S diff -u src/common/lib/libc/arch/arm/string/strcpy.S:1.4 src/common/lib/libc/arch/arm/string/strcpy.S:1.5 --- src/common/lib/libc/arch/arm/string/strcpy.S:1.4 Thu Jan 10 02:13:49 2013 +++ src/common/lib/libc/arch/arm/string/strcpy.S Tue Aug 20 21:35:24 2013 @@ -1,7 +1,11 @@ -/* $NetBSD: strcpy.S,v 1.4 2013/01/10 02:13:49 matt Exp $ */ +/* $NetBSD: strcpy.S,v 1.5 2013/08/20 21:35:24 matt Exp $ */ #if defined(_STANDALONE) +#ifdef __thumb__ +#include strcpy_thumb.S +#else #include strcpy_naive.S +#endif #else #include strcpy_arm.S #endif Index: src/common/lib/libc/arch/arm/string/strlcpy.S diff -u src/common/lib/libc/arch/arm/string/strlcpy.S:1.4 src/common/lib/libc/arch/arm/string/strlcpy.S:1.5 --- src/common/lib/libc/arch/arm/string/strlcpy.S:1.4 Thu Jan 10 06:52:35 2013 +++ src/common/lib/libc/arch/arm/string/strlcpy.S Tue Aug 20 21:35:24 2013 @@ -1,9 +1,13 @@ -/* $NetBSD: strlcpy.S,v 1.4 2013/01/10 06:52:35 matt Exp $ */ +/* $NetBSD: strlcpy.S,v 1.5 2013/08/20 21:35:24 matt Exp $ */ #define STRLCPY #if defined(_STANDALONE) +#if defined(__thumb__) +#include strcpy_thumb.S +#else #include strcpy_naive.S +#endif #else #include strcpy_arm.S #endif Index: src/common/lib/libc/arch/arm/string/strncpy.S diff -u src/common/lib/libc/arch/arm/string/strncpy.S:1.2 src/common/lib/libc/arch/arm/string/strncpy.S:1.3 --- src/common/lib/libc/arch/arm/string/strncpy.S:1.2 Thu Jan 10 02:13:49 2013 +++ src/common/lib/libc/arch/arm/string/strncpy.S Tue Aug 20 21:35:24 2013 @@ -1,9 +1,13 @@ -/* $NetBSD: strncpy.S,v 1.2 2013/01/10 02:13:49 matt Exp $ */ +/* $NetBSD: strncpy.S,v 1.3 2013/08/20 21:35:24 matt Exp $ */ #define STRNCPY #if defined(_STANDALONE) +#if defined(__thumb__) +#include strcpy_thumb.S +#else #include strcpy_naive.S +#endif #else #include strcpy_arm.S #endif
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Tue Aug 20 21:37:39 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strcpy_naive.S Log Message: write of final NUL in strlcpy doesn't need to be post-incremented To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/string/strcpy_naive.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strcpy_naive.S diff -u src/common/lib/libc/arch/arm/string/strcpy_naive.S:1.3 src/common/lib/libc/arch/arm/string/strcpy_naive.S:1.4 --- src/common/lib/libc/arch/arm/string/strcpy_naive.S:1.3 Sun Aug 11 05:02:35 2013 +++ src/common/lib/libc/arch/arm/string/strcpy_naive.S Tue Aug 20 21:37:39 2013 @@ -28,7 +28,7 @@ */ #include machine/asm.h -RCSID($NetBSD: strcpy_naive.S,v 1.3 2013/08/11 05:02:35 matt Exp $) +RCSID($NetBSD: strcpy_naive.S,v 1.4 2013/08/20 21:37:39 matt Exp $) #ifdef _LIBC #ifdef STRLCPY @@ -57,7 +57,7 @@ ENTRY(strlcpy) bne 1b /* no, do next byte */ b 4f /* yes, end of string, so return */ 2: mov r3, #0 /* NUL */ - strb r3, [r0], #1 /* write to end of string */ + strb r3, [r0] /* write to end of string */ 3: ldrb r3, [r1], #1 /* read a byte */ teq r3, #0 /* was it a NUL? */ bne 3b /* no, get next byte */
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Tue Aug 20 07:25:52 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: memcpy.S Log Message: Unless we are using an XSCALE, default to the normal arm version of memcpy. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/string/memcpy.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Tue Aug 20 08:05:49 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strrchr_arm.S Log Message: swap r1 ip use adds, eors, etc. teq - cmp To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/string/strrchr_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Tue Aug 20 08:06:30 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strlen_arm.S Log Message: thumbify (part2) To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/string/strlen_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Tue Aug 20 08:07:30 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strchr.S strlen.S strrchr.S Log Message: Use the arm versions of strlen/strchr/strrchr if compiling thumb2 To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/string/strchr.S \ src/common/lib/libc/arch/arm/string/strlen.S \ src/common/lib/libc/arch/arm/string/strrchr.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Tue Aug 20 08:08:59 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strnlen.S Log Message: Use the arm versions of strnlen if compiling thumb2 To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/string/strnlen.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Tue Aug 20 16:34:47 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strlen_arm.S Log Message: Add a missing it gt before movgt for thumb To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/arch/arm/string/strlen_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Tue Aug 20 21:08:54 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strlcat.S Log Message: strlcat_arm.S is smaller than strlcat_naive.S so always use it. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/strlcat.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Tue Aug 20 21:32:50 UTC 2013 Added Files: src/common/lib/libc/arch/arm/string: strcpy_thumb.S Log Message: Thumb versions of strcpy/strlcpy/strncpy To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/common/lib/libc/arch/arm/string/strcpy_thumb.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Tue Aug 20 21:35:24 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strcpy.S strlcpy.S strncpy.S Log Message: If compiling standalone with Thumb, use the thumb version instead of the naive version. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/string/strcpy.S \ src/common/lib/libc/arch/arm/string/strlcpy.S cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/string/strncpy.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Tue Aug 20 21:37:39 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strcpy_naive.S Log Message: write of final NUL in strlcpy doesn't need to be post-incremented To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/string/strcpy_naive.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 06:11:20 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strlcat_arm.S Log Message: fix cfi_register - cfi_offset To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/string/strlcat_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strlcat_arm.S diff -u src/common/lib/libc/arch/arm/string/strlcat_arm.S:1.2 src/common/lib/libc/arch/arm/string/strlcat_arm.S:1.3 --- src/common/lib/libc/arch/arm/string/strlcat_arm.S:1.2 Mon Aug 19 01:12:08 2013 +++ src/common/lib/libc/arch/arm/string/strlcat_arm.S Mon Aug 19 06:11:20 2013 @@ -29,7 +29,7 @@ #include machine/asm.h -RCSID($NetBSD: strlcat_arm.S,v 1.2 2013/08/19 01:12:08 matt Exp $) +RCSID($NetBSD: strlcat_arm.S,v 1.3 2013/08/19 06:11:20 matt Exp $) /* LINTSTUB: size_t strlcat(char *, const char *, size_t) */ ENTRY(strlcat) @@ -41,10 +41,10 @@ ENTRY(strlcat) #ifdef __ARM_EABI__ .save {r4-r6, lr} .cfi_def_cfa_offset 16 - .cfi_register 14, -4 - .cfi_register 6, -8 - .cfi_register 5, -12 - .cfi_register 4, -16 + .cfi_offset 14, -4 + .cfi_offset 6, -8 + .cfi_offset 5, -12 + .cfi_offset 4, -16 #endif mov r4, r0 /* save dst */ mov r5, r1 /* save src */
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 06:23:59 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: memcmp.S memset.S Log Message: Add END() To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/string/memcmp.S cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/string/memset.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/memcmp.S diff -u src/common/lib/libc/arch/arm/string/memcmp.S:1.2 src/common/lib/libc/arch/arm/string/memcmp.S:1.3 --- src/common/lib/libc/arch/arm/string/memcmp.S:1.2 Sun Aug 11 04:56:32 2013 +++ src/common/lib/libc/arch/arm/string/memcmp.S Mon Aug 19 06:23:59 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: memcmp.S,v 1.2 2013/08/11 04:56:32 matt Exp $ */ +/* $NetBSD: memcmp.S,v 1.3 2013/08/19 06:23:59 matt Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -64,7 +64,7 @@ #include machine/asm.h -RCSID($NetBSD: memcmp.S,v 1.2 2013/08/11 04:56:32 matt Exp $) +RCSID($NetBSD: memcmp.S,v 1.3 2013/08/19 06:23:59 matt Exp $) ENTRY(memcmp) mov ip, r0 @@ -178,3 +178,4 @@ ENTRY(memcmp) sub r0, r3, r2 /* r0 = b1#5 - b2#5 */ RET #endif +END(memcmp) Index: src/common/lib/libc/arch/arm/string/memset.S diff -u src/common/lib/libc/arch/arm/string/memset.S:1.4 src/common/lib/libc/arch/arm/string/memset.S:1.5 --- src/common/lib/libc/arch/arm/string/memset.S:1.4 Sun Aug 11 04:56:32 2013 +++ src/common/lib/libc/arch/arm/string/memset.S Mon Aug 19 06:23:59 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: memset.S,v 1.4 2013/08/11 04:56:32 matt Exp $ */ +/* $NetBSD: memset.S,v 1.5 2013/08/19 06:23:59 matt Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -237,3 +237,8 @@ ENTRY(memset) strbge r3, [ip], #0x01 /* Set another byte */ strbgt r3, [ip] /* and a third */ RET/* Exit */ +#ifdef _BZERO +END(bzero) +#else +END(memset) +#endif
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 17:02:25 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strcat_naive.S strchr_naive.S strlen_naive.S strrchr_naive.S Log Message: cbnz/cbz can not branch backwards so nuke 'em. Use the same register usage in strlen as in strnlen To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/string/strcat_naive.S cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/string/strchr_naive.S \ src/common/lib/libc/arch/arm/string/strrchr_naive.S cvs rdiff -u -r1.7 -r1.8 src/common/lib/libc/arch/arm/string/strlen_naive.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strcat_naive.S diff -u src/common/lib/libc/arch/arm/string/strcat_naive.S:1.2 src/common/lib/libc/arch/arm/string/strcat_naive.S:1.3 --- src/common/lib/libc/arch/arm/string/strcat_naive.S:1.2 Mon Aug 19 02:54:02 2013 +++ src/common/lib/libc/arch/arm/string/strcat_naive.S Mon Aug 19 17:02:25 2013 @@ -29,30 +29,22 @@ #include machine/asm.h -RCSID($NetBSD: strcat_naive.S,v 1.2 2013/08/19 02:54:02 matt Exp $) +RCSID($NetBSD: strcat_naive.S,v 1.3 2013/08/19 17:02:25 matt Exp $) ENTRY(strcat) mov ip, r0 /* need to preserve r0 */ #if defined(__thumb__) 1: ldrb r2, [r0] /* load next byte */ adds r0, r0, #1 /* advance */ -#if defined(_ARM_ARCH_T2) - cbnz r2, 1b /* was it a NUL? no, get next byte */ -#else cmp r2, #0 /* was it a NUL? */ bne 1b /* no, get next byte */ -#endif subs r0, r0, #1 /* back up one to the NUL */ subs r1, r1, r0 /* save one increment */ 2: ldrb r2, [r1, r0] /* load next byte from append */ strb r2, [r0] /* store it */ adds r0, r0, #1 /* advance */ -#if defined(_ARM_ARCH_T2) - cbnz r2, 1b /* was it a NUL? no, get next byte */ -#else cmp r2, #0 /* was it a NUL? */ bne 2b /* no, get next byte */ -#endif mov r0, ip /* restore dst address */ RET/* return */ #else /* !__thumb__ */ Index: src/common/lib/libc/arch/arm/string/strchr_naive.S diff -u src/common/lib/libc/arch/arm/string/strchr_naive.S:1.3 src/common/lib/libc/arch/arm/string/strchr_naive.S:1.4 --- src/common/lib/libc/arch/arm/string/strchr_naive.S:1.3 Mon Aug 19 02:22:25 2013 +++ src/common/lib/libc/arch/arm/string/strchr_naive.S Mon Aug 19 17:02:25 2013 @@ -28,7 +28,7 @@ */ #include machine/asm.h -RCSID($NetBSD: strchr_naive.S,v 1.3 2013/08/19 02:22:25 matt Exp $) +RCSID($NetBSD: strchr_naive.S,v 1.4 2013/08/19 17:02:25 matt Exp $) /* LINTSTUB: char * strchr(const char *, int) */ ENTRY(strchr) @@ -39,12 +39,8 @@ ENTRY(strchr) cmp r3, r1 /* does it match? */ beq 2f /* yes, set return value */ adds r0, r0, #1 /* advance to next byte */ -#ifdef _ARM_ARCH_T2 - cbnz r3, 1b /* was it a NUL? no, get next byte */ -#else cmp r3, #0 /* was it a NUL? */ bne 1b /* no, get next byte */ -#endif movs r0, #0 /* set return to NULL */ 2: RET /* return */ #else Index: src/common/lib/libc/arch/arm/string/strrchr_naive.S diff -u src/common/lib/libc/arch/arm/string/strrchr_naive.S:1.3 src/common/lib/libc/arch/arm/string/strrchr_naive.S:1.4 --- src/common/lib/libc/arch/arm/string/strrchr_naive.S:1.3 Mon Aug 19 02:36:27 2013 +++ src/common/lib/libc/arch/arm/string/strrchr_naive.S Mon Aug 19 17:02:25 2013 @@ -28,7 +28,7 @@ */ #include machine/asm.h -RCSID($NetBSD: strrchr_naive.S,v 1.3 2013/08/19 02:36:27 matt Exp $) +RCSID($NetBSD: strrchr_naive.S,v 1.4 2013/08/19 17:02:25 matt Exp $) /* LINTSTUB: char * strrchr(const char *, int) */ ENTRY(strrchr) @@ -42,12 +42,8 @@ ENTRY(strrchr) bne 2f /* no, go and advance */ mov r0, r2 /* yes, set return value to point to it */ 2: adds r2, r2, #1 /* advance to next byte */ -#ifdef _ARM_ARCH_T2 - cbnz r3, 1b /* was it a NUL? no, get next byte */ -#else cmp r3, #0 /* was it a NUL? */ bne 1b /* no, get next byte */ -#endif #else and r1, r1, #0xff /* restrict to a byte value */ 1: ldrb r3, [r2], #1 /* read a byte */ Index: src/common/lib/libc/arch/arm/string/strlen_naive.S diff -u src/common/lib/libc/arch/arm/string/strlen_naive.S:1.7 src/common/lib/libc/arch/arm/string/strlen_naive.S:1.8 --- src/common/lib/libc/arch/arm/string/strlen_naive.S:1.7 Mon Aug 19 02:13:13 2013 +++ src/common/lib/libc/arch/arm/string/strlen_naive.S Mon Aug 19 17:02:25 2013 @@ -28,7 +28,7 @@ */ #include machine/asm.h -RCSID($NetBSD: strlen_naive.S,v 1.7 2013/08/19 02:13:13 matt Exp $) +RCSID($NetBSD: strlen_naive.S,v 1.8 2013/08/19 17:02:25 matt Exp $) #ifdef STRNLEN /* LINTSTUB: size_t strnlen(const char *, size_t) */ @@ -58,17 +58,17 @@ END(strnlen) #else /* STRNLEN */ /* LINTSTUB: size_t strlen(const char *) */ ENTRY(strlen) - adds r2, r0, #1 /* start of src + NUL */ + adds r3, r0, #1 /* start of src + NUL */ 1: #ifdef __thumb__ - ldrb r3, [r0] /* read a byte */ + ldrb r2, [r0] /*
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 17:38:47 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strchr_arm.S Log Message: Swap use of r1 and ip teq - cmp. add s to few instructions (thumbify part 1) To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/arch/arm/string/strchr_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strchr_arm.S diff -u src/common/lib/libc/arch/arm/string/strchr_arm.S:1.5 src/common/lib/libc/arch/arm/string/strchr_arm.S:1.6 --- src/common/lib/libc/arch/arm/string/strchr_arm.S:1.5 Fri Feb 8 02:19:35 2013 +++ src/common/lib/libc/arch/arm/string/strchr_arm.S Mon Aug 19 17:38:47 2013 @@ -29,7 +29,7 @@ #include machine/asm.h -RCSID($NetBSD: strchr_arm.S,v 1.5 2013/02/08 02:19:35 matt Exp $) +RCSID($NetBSD: strchr_arm.S,v 1.6 2013/08/19 17:38:47 matt Exp $) #ifdef __ARMEL__ #define BYTE0 0x00ff @@ -37,12 +37,14 @@ RCSID($NetBSD: strchr_arm.S,v 1.5 2013/ #define BYTE2 0x00ff #define BYTE3 0xff00 #define lshi lsl +#define lshis lsls #else #define BYTE0 0xff00 #define BYTE1 0x00ff #define BYTE2 0xff00 #define BYTE3 0x00ff #define lshi lsr +#define lshis lsrs #endif .text @@ -53,20 +55,20 @@ ENTRY(strchr) ldrb r3, [r0], #1 /* load a byte */ cmp r3, r2 /* is it a match? */ beq 2f /* yes, return current ptr - 1 */ - teq r3, #0 /* no, was it 0? */ + cmp r3, #0 /* no, was it 0? */ bne 1b /* no, try next byte */ - mov r0, #0 /* yes, set return value to NULL */ + movs r0, #0 /* yes, set return value to NULL */ RET/* return */ -2: sub r0, r0, #1 /* back up by one */ +2: subs r0, r0, #1 /* back up by one */ RET/* return */ .Lpre_main_loop: #if defined(_ARM_ARCH_7) - movw r1, #0xfefe /* magic constant; 254 in each byte */ - movt r1, #0xfefe /* magic constant; 254 in each byte */ + movw ip, #0xfefe /* magic constant; 254 in each byte */ + movt ip, #0xfefe /* magic constant; 254 in each byte */ #elif defined(_ARM_ARCH_6) - mov r1, #0xfe /* put 254 in low byte */ - orr r1, r1, r1, lsl #8 /* move to next byte */ - orr r1, r1, r1, lsl #16 /* move to next halfword */ + mov ip, #0xfe /* put 254 in low byte */ + orr ip, ip, ip, lsl #8 /* move to next byte */ + orr ip, ip, ip, lsl #16 /* move to next halfword */ #endif /* _ARM_ARCH_6 */ orr r2, r2, r2, lsl #8 /* move to next byte */ orr r2, r2, r2, lsl #16 /* move to next halfword */ @@ -79,10 +81,10 @@ ENTRY(strchr) * become 255. For NUL, it will be 254. When we complement the * result, if the result is non-0 then we must have encountered a NUL. */ - uqadd8 ip, r3, r1 /* NUL detection happens here */ - eor r3, r3, r2 /* xor to clear each lane */ - uqadd8 r3, r3, r1 /* char detection happens here */ - and r3, r3, ip /* merge results */ + uqadd8 r1, r3, ip /* NUL detection happens here */ + eors r3, r3, r2 /* xor to clear each lane */ + uqadd8 r3, r3, ip /* char detection happens here */ + ands r3, r3, r1 /* merge results */ mvns r3, r3 /* is the complement non-0? */ beq .Lmain_loop /*no, then keep going */ @@ -92,14 +94,14 @@ ENTRY(strchr) */ teq r2, #0 /* searching for NUL? */ beq .Lfind_match /* yes, find the match */ - mvns ip, ip /* did we encounter a NUL? */ + mvns r1, r1 /* did we encounter a NUL? */ beq .Lfind_match /* no, find the match */ - bics r3, r3, ip /* clear match for the NUL(s) */ + bics r3, r3, r1 /* clear match for the NUL(s) */ beq .Lnomatch /* any left set? if not, no match */ - movs ip, ip, lshi #8 /* replicate NUL bit to other bytes */ - orrne ip, ip, ip, lshi #8 /* replicate NUL bit to other bytes */ - orrne ip, ip, ip, lshi #8 /* replicate NUL bit to other bytes */ - bics r3, r3, ip /* clear any match bits after the NUL */ + lshis r1, r1, #8 /* replicate NUL bit to other bytes */ + orrne r1, r1, r1, lshi #8 /* replicate NUL bit to other bytes */ + orrne r1, r1, r1, lshi #8 /* replicate NUL bit to other bytes */ + bics r3, r3, r1 /* clear any match bits after the NUL */ beq .Lnomatch /* any left set? if not, no match */ .Lfind_match: #ifdef __ARMEL__ @@ -107,49 +109,49 @@ ENTRY(strchr) #endif clz r3, r3 /* count how many leading zeros */ add r0, r0, r3, lsr #3 /* divide that by 8 and add to count */ - sub r0, r0, #4 /* compensate for the post-inc */ + subs r0, r0, #4 /* compensate for the post-inc */ RET .Lnomatch: - mov r0, #0 + movs r0, #0 RET #else /* * No fancy shortcuts so just test each byte lane for a NUL. * (other tests for NULs in a word take more instructions/cycles). */ - eor ip, r3, r2 /* xor .. */ + eor r1, r3, r2 /* xor .. */ tst r3, #BYTE0 /* is this byte NUL? */ - tstne ip, #BYTE0 /* no, does this byte match? */ + tstne r1, #BYTE0 /* no, does this byte match? */ tstne r3, #BYTE1 /* no, is this
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 17:41:47 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strchr_arm.S Log Message: Missing one teq - cmp To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/common/lib/libc/arch/arm/string/strchr_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strchr_arm.S diff -u src/common/lib/libc/arch/arm/string/strchr_arm.S:1.6 src/common/lib/libc/arch/arm/string/strchr_arm.S:1.7 --- src/common/lib/libc/arch/arm/string/strchr_arm.S:1.6 Mon Aug 19 17:38:47 2013 +++ src/common/lib/libc/arch/arm/string/strchr_arm.S Mon Aug 19 17:41:47 2013 @@ -29,7 +29,7 @@ #include machine/asm.h -RCSID($NetBSD: strchr_arm.S,v 1.6 2013/08/19 17:38:47 matt Exp $) +RCSID($NetBSD: strchr_arm.S,v 1.7 2013/08/19 17:41:47 matt Exp $) #ifdef __ARMEL__ #define BYTE0 0x00ff @@ -92,7 +92,7 @@ ENTRY(strchr) * We've encountered a NUL or a match but we don't know which happened * first. */ - teq r2, #0 /* searching for NUL? */ + cmp r2, #0 /* searching for NUL? */ beq .Lfind_match /* yes, find the match */ mvns r1, r1 /* did we encounter a NUL? */ beq .Lfind_match /* no, find the match */
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 17:50:04 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strchr_arm.S Log Message: Add two thumb2 bits. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/common/lib/libc/arch/arm/string/strchr_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strchr_arm.S diff -u src/common/lib/libc/arch/arm/string/strchr_arm.S:1.7 src/common/lib/libc/arch/arm/string/strchr_arm.S:1.8 --- src/common/lib/libc/arch/arm/string/strchr_arm.S:1.7 Mon Aug 19 17:41:47 2013 +++ src/common/lib/libc/arch/arm/string/strchr_arm.S Mon Aug 19 17:50:04 2013 @@ -29,7 +29,11 @@ #include machine/asm.h -RCSID($NetBSD: strchr_arm.S,v 1.7 2013/08/19 17:41:47 matt Exp $) +RCSID($NetBSD: strchr_arm.S,v 1.8 2013/08/19 17:50:04 matt Exp $) + +#if defined(__thumb__) !defined(_ARM_ARCH_T2) +#error Only Thumb2 or ARM supported +#endif #ifdef __ARMEL__ #define BYTE0 0x00ff @@ -92,13 +96,20 @@ ENTRY(strchr) * We've encountered a NUL or a match but we don't know which happened * first. */ +#if defined(__thumb__) defined(_ARM_ARCH_T2) + cbz r2, .Lfind_match /* searching for NUL? yes, find it */ +#else cmp r2, #0 /* searching for NUL? */ beq .Lfind_match /* yes, find the match */ +#endif mvns r1, r1 /* did we encounter a NUL? */ beq .Lfind_match /* no, find the match */ bics r3, r3, r1 /* clear match for the NUL(s) */ beq .Lnomatch /* any left set? if not, no match */ lshis r1, r1, #8 /* replicate NUL bit to other bytes */ +#ifdef __thumb__ + itt ne +#endif orrne r1, r1, r1, lshi #8 /* replicate NUL bit to other bytes */ orrne r1, r1, r1, lshi #8 /* replicate NUL bit to other bytes */ bics r3, r3, r1 /* clear any match bits after the NUL */
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 06:11:20 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strlcat_arm.S Log Message: fix cfi_register - cfi_offset To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/string/strlcat_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 06:23:59 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: memcmp.S memset.S Log Message: Add END() To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/string/memcmp.S cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/string/memset.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 17:02:25 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strcat_naive.S strchr_naive.S strlen_naive.S strrchr_naive.S Log Message: cbnz/cbz can not branch backwards so nuke 'em. Use the same register usage in strlen as in strnlen To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/string/strcat_naive.S cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/string/strchr_naive.S \ src/common/lib/libc/arch/arm/string/strrchr_naive.S cvs rdiff -u -r1.7 -r1.8 src/common/lib/libc/arch/arm/string/strlen_naive.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 17:38:47 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strchr_arm.S Log Message: Swap use of r1 and ip teq - cmp. add s to few instructions (thumbify part 1) To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/arch/arm/string/strchr_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 17:41:47 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strchr_arm.S Log Message: Missing one teq - cmp To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/common/lib/libc/arch/arm/string/strchr_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 17:50:04 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strchr_arm.S Log Message: Add two thumb2 bits. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/common/lib/libc/arch/arm/string/strchr_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 00:36:29 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strcat_arm.S Log Message: Add .cfi ops if EABI. Thumbify. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/string/strcat_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strcat_arm.S diff -u src/common/lib/libc/arch/arm/string/strcat_arm.S:1.2 src/common/lib/libc/arch/arm/string/strcat_arm.S:1.3 --- src/common/lib/libc/arch/arm/string/strcat_arm.S:1.2 Tue Jan 15 04:48:14 2013 +++ src/common/lib/libc/arch/arm/string/strcat_arm.S Mon Aug 19 00:36:29 2013 @@ -33,20 +33,33 @@ * Implementation of strcat using strlen/strcpy. */ ENTRY(strcat) - str lr, [sp, #-8]! /* save return address */ - push {r4, r5} /* save registers */ +#ifdef __ARM_EABI__ + .fnstart + .cfi_startproc +#endif + push {r3-r5, lr} /* save registers */ +#ifdef __ARM_EABI__ + .save {r3-r5, lr} + .cfi_def_cfa_offset 16 + .cfi_offset 14, -4 + .cfi_offset 5, -8 + .cfi_offset 4, -12 + .cfi_offset 3, -16 +#endif mov r4, r0 /* save dst */ mov r5, r1 /* save append */ bl PLT_SYM(strlen) /* find length of dst */ - add r0, r0, r4 /* add to dst pointer */ + adds r0, r0, r4 /* add to dst pointer */ mov r1, r5 /* fetch append */ bl PLT_SYM(strcpy) /* append string */ mov r0, r4 /* restore dst as return value */ - pop {r4, r5} /* restore registers */ - ldr lr, [sp], #8 /* restore return address */ - RET + pop {r3-r5, pc} /* restore registers */ +#ifdef __ARM_EABI__ + .cfi_endproc + .fnend +#endif END(strcat)
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 00:56:12 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strcmp.S Log Message: Thumbify To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/strcmp.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strcmp.S diff -u src/common/lib/libc/arch/arm/string/strcmp.S:1.1 src/common/lib/libc/arch/arm/string/strcmp.S:1.2 --- src/common/lib/libc/arch/arm/string/strcmp.S:1.1 Tue Dec 20 19:28:49 2005 +++ src/common/lib/libc/arch/arm/string/strcmp.S Mon Aug 19 00:56:12 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: strcmp.S,v 1.1 2005/12/20 19:28:49 christos Exp $ */ +/* $NetBSD: strcmp.S,v 1.2 2013/08/19 00:56:12 matt Exp $ */ /* * Copyright (c) 2002 ARM Ltd @@ -30,14 +30,24 @@ #include machine/asm.h -RCSID($NetBSD: strcmp.S,v 1.1 2005/12/20 19:28:49 christos Exp $) +RCSID($NetBSD: strcmp.S,v 1.2 2013/08/19 00:56:12 matt Exp $) ENTRY(strcmp) -1: - ldrb r2, [r0], #1 +#if !defined(__thumb__) +1: ldrb r2, [r0], #1 ldrb r3, [r1], #1 cmp r2, #1 cmpcs r2, r3 +#else + subs r1, r1, r0 /* this allows us to only one increment */ +1: ldrb r2, [r0] + ldrb r3, [r1, r0] + adds r0, r0, #1 /* increment */ + cmp r2, #1 + bcc 2f + cmp r2, r3 +#endif beq 1b - sub r0, r2, r3 +2: subs r0, r2, r3 RET +END(strcmp)
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 00:57:25 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strncmp.S Log Message: Thumbify To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/strncmp.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strncmp.S diff -u src/common/lib/libc/arch/arm/string/strncmp.S:1.1 src/common/lib/libc/arch/arm/string/strncmp.S:1.2 --- src/common/lib/libc/arch/arm/string/strncmp.S:1.1 Tue Dec 20 19:28:49 2005 +++ src/common/lib/libc/arch/arm/string/strncmp.S Mon Aug 19 00:57:25 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: strncmp.S,v 1.1 2005/12/20 19:28:49 christos Exp $ */ +/* $NetBSD: strncmp.S,v 1.2 2013/08/19 00:57:25 matt Exp $ */ /* * Copyright (c) 2002 ARM Ltd @@ -30,22 +30,48 @@ #include machine/asm.h -RCSID($NetBSD: strncmp.S,v 1.1 2005/12/20 19:28:49 christos Exp $) +RCSID($NetBSD: strncmp.S,v 1.2 2013/08/19 00:57:25 matt Exp $) ENTRY(strncmp) /* if ((len - 1) 0) return 0 */ subs r2, r2, #1 +#ifdef __thumb__ + bmi 5f +#else movmi r0, #0 RETc(mi) +#endif /* ip == last src address to compare */ +#ifdef __thumb__ + adds r3, r0, r2 + mov ip, r3 + subs r1, r1, r0 +#else add ip, r0, r2 +#endif 1: +#ifdef __thumb__ + ldrb r2, [r0] + ldrb r3, [r1, r0] + adds r0, r0, #1 + cmp ip, r0 /* exhausted length? */ + bcc 4f /* yes, we're done */ + cmp r2, #1 /* NUL? */ + bcc 4f /* yes, we're done */ + cmp r2, r3 /* different? */ +#else ldrb r2, [r0], #1 ldrb r3, [r1], #1 cmp ip, r0 cmpcs r2, #1 cmpcs r2, r3 +#endif beq 1b - sub r0, r2, r3 +4: subs r0, r2, r3 RET +#ifdef __thumb__ +5: movs r0, #0 + RET +#endif +END(strncmp)
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 01:08:29 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strchr.S strlen.S strnlen.S strrchr.S Log Message: For Thumb, use naive version To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/string/strchr.S \ src/common/lib/libc/arch/arm/string/strlen.S \ src/common/lib/libc/arch/arm/string/strrchr.S cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/strnlen.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strchr.S diff -u src/common/lib/libc/arch/arm/string/strchr.S:1.2 src/common/lib/libc/arch/arm/string/strchr.S:1.3 --- src/common/lib/libc/arch/arm/string/strchr.S:1.2 Wed Jan 23 07:45:46 2013 +++ src/common/lib/libc/arch/arm/string/strchr.S Mon Aug 19 01:08:29 2013 @@ -1,10 +1,10 @@ -/* $NetBSD: strchr.S,v 1.2 2013/01/23 07:45:46 matt Exp $ */ +/* $NetBSD: strchr.S,v 1.3 2013/08/19 01:08:29 matt Exp $ */ #include machine/asm.h STRONG_ALIAS(index, strchr) -#if defined(_STANDALONE) +#if defined(_STANDALONE) || defined(__thumb__) #include strchr_naive.S #else #include strchr_arm.S Index: src/common/lib/libc/arch/arm/string/strlen.S diff -u src/common/lib/libc/arch/arm/string/strlen.S:1.2 src/common/lib/libc/arch/arm/string/strlen.S:1.3 --- src/common/lib/libc/arch/arm/string/strlen.S:1.2 Tue Jan 8 13:21:05 2013 +++ src/common/lib/libc/arch/arm/string/strlen.S Mon Aug 19 01:08:29 2013 @@ -1,6 +1,6 @@ -/* $NetBSD: strlen.S,v 1.2 2013/01/08 13:21:05 matt Exp $ */ +/* $NetBSD: strlen.S,v 1.3 2013/08/19 01:08:29 matt Exp $ */ -#ifdef _STANDALONE +#if defined(_STANDALONE) || defined(__thumb__) #include strlen_naive.S #else #include strlen_arm.S Index: src/common/lib/libc/arch/arm/string/strrchr.S diff -u src/common/lib/libc/arch/arm/string/strrchr.S:1.2 src/common/lib/libc/arch/arm/string/strrchr.S:1.3 --- src/common/lib/libc/arch/arm/string/strrchr.S:1.2 Wed Jan 23 07:45:46 2013 +++ src/common/lib/libc/arch/arm/string/strrchr.S Mon Aug 19 01:08:29 2013 @@ -1,10 +1,10 @@ -/* $NetBSD: strrchr.S,v 1.2 2013/01/23 07:45:46 matt Exp $ */ +/* $NetBSD: strrchr.S,v 1.3 2013/08/19 01:08:29 matt Exp $ */ #include machine/asm.h STRONG_ALIAS(rindex, strrchr) -#if defined(_STANDALONE) +#if defined(_STANDALONE) || defined(__thumb__) #include strrchr_naive.S #else #include strrchr_arm.S Index: src/common/lib/libc/arch/arm/string/strnlen.S diff -u src/common/lib/libc/arch/arm/string/strnlen.S:1.1 src/common/lib/libc/arch/arm/string/strnlen.S:1.2 --- src/common/lib/libc/arch/arm/string/strnlen.S:1.1 Wed Jan 23 07:56:09 2013 +++ src/common/lib/libc/arch/arm/string/strnlen.S Mon Aug 19 01:08:29 2013 @@ -1,8 +1,8 @@ -/* $NetBSD: strnlen.S,v 1.1 2013/01/23 07:56:09 matt Exp $ */ +/* $NetBSD: strnlen.S,v 1.2 2013/08/19 01:08:29 matt Exp $ */ #define STRNLEN -#ifdef _STANDALONE +#if defined(_STANDALONE) || defined(__thumb__) #include strlen_naive.S #else #include strlen_arm.S
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 01:08:53 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: memcpy_xscale.S Log Message: Add END(memcpy) To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/string/memcpy_xscale.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/memcpy_xscale.S diff -u src/common/lib/libc/arch/arm/string/memcpy_xscale.S:1.3 src/common/lib/libc/arch/arm/string/memcpy_xscale.S:1.4 --- src/common/lib/libc/arch/arm/string/memcpy_xscale.S:1.3 Sun Aug 11 04:56:32 2013 +++ src/common/lib/libc/arch/arm/string/memcpy_xscale.S Mon Aug 19 01:08:53 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: memcpy_xscale.S,v 1.3 2013/08/11 04:56:32 matt Exp $ */ +/* $NetBSD: memcpy_xscale.S,v 1.4 2013/08/19 01:08:53 matt Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -1890,4 +1890,5 @@ ENTRY(memcpy) strh r2, [r0, #0x09] strb r1, [r0, #0x0b] RET +END(memcpy) #endif /* !_STANDALONE */
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 01:12:08 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strlcat_arm.S Log Message: Add .cfi for __ARM_EABI__ Thumbify To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/strlcat_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strlcat_arm.S diff -u src/common/lib/libc/arch/arm/string/strlcat_arm.S:1.1 src/common/lib/libc/arch/arm/string/strlcat_arm.S:1.2 --- src/common/lib/libc/arch/arm/string/strlcat_arm.S:1.1 Wed Jan 23 07:02:45 2013 +++ src/common/lib/libc/arch/arm/string/strlcat_arm.S Mon Aug 19 01:12:08 2013 @@ -29,11 +29,23 @@ #include machine/asm.h -RCSID($NetBSD: strlcat_arm.S,v 1.1 2013/01/23 07:02:45 matt Exp $) +RCSID($NetBSD: strlcat_arm.S,v 1.2 2013/08/19 01:12:08 matt Exp $) /* LINTSTUB: size_t strlcat(char *, const char *, size_t) */ ENTRY(strlcat) +#ifdef __ARM_EABI__ + .fnstart + .cfi_startproc +#endif push {r4-r6, lr} +#ifdef __ARM_EABI__ + .save {r4-r6, lr} + .cfi_def_cfa_offset 16 + .cfi_register 14, -4 + .cfi_register 6, -8 + .cfi_register 5, -12 + .cfi_register 4, -16 +#endif mov r4, r0 /* save dst */ mov r5, r1 /* save src */ mov r6, r2 /* save siz */ @@ -41,12 +53,15 @@ ENTRY(strlcat) mov r1, r6 /* get siz */ bl PLT_SYM(strnlen) /* find length of dst (up to siz) */ - sub r2, r6, r0 /* get remaining space in dst */ + subs r2, r6, r0 /* get remaining space in dst */ mov r1, r5 /* restore src */ mov r5, r0 /* save remaining space */ - add r0, r0, r4 /* set start to end of dst */ + adds r0, r0, r4 /* set start to end of dst */ bl PLT_SYM(strlcpy) /* attempt to copy src */ - add r0, r0, r5 /* add remaining to strlcpy return */ - pop {r4-r6, lr} /* restore registers */ - RET/* return */ + adds r0, r0, r5 /* add remaining to strlcpy return */ + pop {r4-r6, pc} /* restore registers and return */ +#ifdef __ARM_EABI__ + .cfi_endproc + .fnend +#endif END(strlcat)
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 01:17:32 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strlen_arm.S Log Message: For EABI, add .cfi ops To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/string/strlen_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strlen_arm.S diff -u src/common/lib/libc/arch/arm/string/strlen_arm.S:1.3 src/common/lib/libc/arch/arm/string/strlen_arm.S:1.4 --- src/common/lib/libc/arch/arm/string/strlen_arm.S:1.3 Wed Jan 23 06:59:55 2013 +++ src/common/lib/libc/arch/arm/string/strlen_arm.S Mon Aug 19 01:17:32 2013 @@ -29,7 +29,7 @@ #include machine/asm.h -RCSID($NetBSD: strlen_arm.S,v 1.3 2013/01/23 06:59:55 matt Exp $) +RCSID($NetBSD: strlen_arm.S,v 1.4 2013/08/19 01:17:32 matt Exp $) #ifdef __ARMEL__ #define BYTE0 0x00ff @@ -51,8 +51,18 @@ RCSID($NetBSD: strlen_arm.S,v 1.3 2013/ .text ENTRY(FUNCNAME) +#ifdef __ARM_EABI__ + .fnstart + .cfi_startproc +#endif #ifdef STRNLEN push {r4,r5} /* save some registers */ +#ifdef __ARM_EABI__ + .save {r4,r5} + .cfi_def_cfa_offset 8 + .cfi_offset 5, -4 + .cfi_offset 4, -8 +#endif add r5, r0, r1 /* get ptr to end of string */ mov r4, r1 /* save maxlen */ #endif @@ -151,4 +161,8 @@ ENTRY(FUNCNAME) pop {r4, r5} /* restore registers */ RET/* return */ #endif +#ifdef __ARM_EABI__ + .cfi_endproc + .fnend +#endif END(FUNCNAME)
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 02:07:22 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strlen_naive.S Log Message: teq - cmp ip - r2 add/sub - adds/subs (thumbify part 1) To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/string/strlen_naive.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strlen_naive.S diff -u src/common/lib/libc/arch/arm/string/strlen_naive.S:1.3 src/common/lib/libc/arch/arm/string/strlen_naive.S:1.4 --- src/common/lib/libc/arch/arm/string/strlen_naive.S:1.3 Wed Jan 23 06:59:55 2013 +++ src/common/lib/libc/arch/arm/string/strlen_naive.S Mon Aug 19 02:07:22 2013 @@ -28,19 +28,19 @@ */ #include machine/asm.h -RCSID($NetBSD: strlen_naive.S,v 1.3 2013/01/23 06:59:55 matt Exp $) +RCSID($NetBSD: strlen_naive.S,v 1.4 2013/08/19 02:07:22 matt Exp $) #ifdef STRNLEN /* LINTSTUB: size_t strnlen(const char *, size_t) */ ENTRY(strnlen) - add ip, r0, #1 /* start of src + NUL */ - add r2, r0, r1 /* src[maxlen] */ + adds r2, r0, #1 /* start of src + NUL */ + adds r2, r0, r1 /* src[maxlen] */ 1: cmp r0, r2 /* is this of string? */ beq 2f /* yes it is */ ldrb r3, [r0], #1 /* read a byte */ - teq r3, #0 /* is it a NUL? */ + cmp r3, #0 /* is it a NUL? */ bne 1b /* no, get next byte */ - sub r0, r0, ip /* get difference between start and end */ + subs r0, r0, r2 /* get difference between start and end */ RET /* return */ 2: mov r0, r1 /* get maxlen */ RET /* return */ @@ -48,11 +48,12 @@ END(strnlen) #else /* STRNLEN */ /* LINTSTUB: size_t strlen(const char *) */ ENTRY(strlen) - add ip, r0, #1 /* start of src + NUL */ -1: ldrb r3, [r0], #1 /* read a byte */ - teq r3, #0 /* is it a NUL? */ + adds r2, r0, #1 /* start of src + NUL */ +1: + ldrb r3, [r0], #1 /* read a byte */ + cmp r3, #0 /* is it a NUL? */ bne 1b /* no, get next byte */ - sub r0, r0, ip /* return difference between start and end */ + subs r0, r0, r2 /* return difference between start and end */ RET END(strlen) #endif /* !STRNLEN */
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 02:08:41 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strlen_naive.S Log Message: Change previous use of r2 to r3 To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/string/strlen_naive.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strlen_naive.S diff -u src/common/lib/libc/arch/arm/string/strlen_naive.S:1.4 src/common/lib/libc/arch/arm/string/strlen_naive.S:1.5 --- src/common/lib/libc/arch/arm/string/strlen_naive.S:1.4 Mon Aug 19 02:07:22 2013 +++ src/common/lib/libc/arch/arm/string/strlen_naive.S Mon Aug 19 02:08:41 2013 @@ -28,19 +28,19 @@ */ #include machine/asm.h -RCSID($NetBSD: strlen_naive.S,v 1.4 2013/08/19 02:07:22 matt Exp $) +RCSID($NetBSD: strlen_naive.S,v 1.5 2013/08/19 02:08:41 matt Exp $) #ifdef STRNLEN /* LINTSTUB: size_t strnlen(const char *, size_t) */ ENTRY(strnlen) - adds r2, r0, #1 /* start of src + NUL */ + adds r3, r0, #1 /* start of src + NUL */ adds r2, r0, r1 /* src[maxlen] */ 1: cmp r0, r2 /* is this of string? */ beq 2f /* yes it is */ ldrb r3, [r0], #1 /* read a byte */ cmp r3, #0 /* is it a NUL? */ bne 1b /* no, get next byte */ - subs r0, r0, r2 /* get difference between start and end */ + subs r0, r0, r3 /* get difference between start and end */ RET /* return */ 2: mov r0, r1 /* get maxlen */ RET /* return */
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 02:11:03 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strlen_naive.S Log Message: Use ip as a temporary To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/arch/arm/string/strlen_naive.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strlen_naive.S diff -u src/common/lib/libc/arch/arm/string/strlen_naive.S:1.5 src/common/lib/libc/arch/arm/string/strlen_naive.S:1.6 --- src/common/lib/libc/arch/arm/string/strlen_naive.S:1.5 Mon Aug 19 02:08:41 2013 +++ src/common/lib/libc/arch/arm/string/strlen_naive.S Mon Aug 19 02:11:03 2013 @@ -28,17 +28,17 @@ */ #include machine/asm.h -RCSID($NetBSD: strlen_naive.S,v 1.5 2013/08/19 02:08:41 matt Exp $) +RCSID($NetBSD: strlen_naive.S,v 1.6 2013/08/19 02:11:03 matt Exp $) #ifdef STRNLEN /* LINTSTUB: size_t strnlen(const char *, size_t) */ ENTRY(strnlen) adds r3, r0, #1 /* start of src + NUL */ - adds r2, r0, r1 /* src[maxlen] */ -1: cmp r0, r2 /* is this of string? */ + adds ip, r0, r1 /* src[maxlen] */ +1: cmp r0, ip /* is this of string? */ beq 2f /* yes it is */ - ldrb r3, [r0], #1 /* read a byte */ - cmp r3, #0 /* is it a NUL? */ + ldrb r2, [r0], #1 /* read a byte */ + cmp r2, #0 /* is it a NUL? */ bne 1b /* no, get next byte */ subs r0, r0, r3 /* get difference between start and end */ RET /* return */
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 02:13:14 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strlen_naive.S Log Message: Thumbify To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/common/lib/libc/arch/arm/string/strlen_naive.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strlen_naive.S diff -u src/common/lib/libc/arch/arm/string/strlen_naive.S:1.6 src/common/lib/libc/arch/arm/string/strlen_naive.S:1.7 --- src/common/lib/libc/arch/arm/string/strlen_naive.S:1.6 Mon Aug 19 02:11:03 2013 +++ src/common/lib/libc/arch/arm/string/strlen_naive.S Mon Aug 19 02:13:13 2013 @@ -28,16 +28,26 @@ */ #include machine/asm.h -RCSID($NetBSD: strlen_naive.S,v 1.6 2013/08/19 02:11:03 matt Exp $) +RCSID($NetBSD: strlen_naive.S,v 1.7 2013/08/19 02:13:13 matt Exp $) #ifdef STRNLEN /* LINTSTUB: size_t strnlen(const char *, size_t) */ ENTRY(strnlen) adds r3, r0, #1 /* start of src + NUL */ +#ifdef __thumb__ + adds r2, r0, r1 /* src[maxlen] */ + mov ip, r2 +#else adds ip, r0, r1 /* src[maxlen] */ +#endif 1: cmp r0, ip /* is this of string? */ beq 2f /* yes it is */ +#ifdef __thumb__ + ldrb r2, [r0] /* read a byte */ + adds r0, r0, #1 /* advance to next byte */ +#else ldrb r2, [r0], #1 /* read a byte */ +#endif cmp r2, #0 /* is it a NUL? */ bne 1b /* no, get next byte */ subs r0, r0, r3 /* get difference between start and end */ @@ -50,7 +60,12 @@ END(strnlen) ENTRY(strlen) adds r2, r0, #1 /* start of src + NUL */ 1: +#ifdef __thumb__ + ldrb r3, [r0] /* read a byte */ + adds r0, r0, #1 +#else ldrb r3, [r0], #1 /* read a byte */ +#endif cmp r3, #0 /* is it a NUL? */ bne 1b /* no, get next byte */ subs r0, r0, r2 /* return difference between start and end */
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 02:20:06 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strchr_naive.S Log Message: ip - r2 teq - cmp To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/strchr_naive.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strchr_naive.S diff -u src/common/lib/libc/arch/arm/string/strchr_naive.S:1.1 src/common/lib/libc/arch/arm/string/strchr_naive.S:1.2 --- src/common/lib/libc/arch/arm/string/strchr_naive.S:1.1 Tue Jan 15 02:03:30 2013 +++ src/common/lib/libc/arch/arm/string/strchr_naive.S Mon Aug 19 02:20:06 2013 @@ -28,17 +28,17 @@ */ #include machine/asm.h -RCSID($NetBSD: strchr_naive.S,v 1.1 2013/01/15 02:03:30 matt Exp $) +RCSID($NetBSD: strchr_naive.S,v 1.2 2013/08/19 02:20:06 matt Exp $) /* LINTSTUB: char * strchr(const char *, int) */ ENTRY(strchr) - mov ip, r0 /* using r0 as return value */ + mov r2, r0 /* using r0 as return value */ mov r0, #0 /* default to no match */ and r1, r1, #0xff /* restrict to a byte value */ -1: ldrb r3, [ip], #1 /* read a byte */ +1: ldrb r3, [r2], #1 /* read a byte */ cmp r3, r1 /* does it match? */ - subeq r0, ip, #1 /* yes, set return value to point to it */ - teqne r3, #0 /* no, was it a NUL? */ + subeq r0, r2, #1 /* yes, set return value to point to it */ + cmpne r3, #0 /* no, was it a NUL? */ bne 1b /* no, get next byte */ RET END(strchr)
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 02:22:25 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strchr_naive.S Log Message: Thumbify To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/string/strchr_naive.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strchr_naive.S diff -u src/common/lib/libc/arch/arm/string/strchr_naive.S:1.2 src/common/lib/libc/arch/arm/string/strchr_naive.S:1.3 --- src/common/lib/libc/arch/arm/string/strchr_naive.S:1.2 Mon Aug 19 02:20:06 2013 +++ src/common/lib/libc/arch/arm/string/strchr_naive.S Mon Aug 19 02:22:25 2013 @@ -28,10 +28,26 @@ */ #include machine/asm.h -RCSID($NetBSD: strchr_naive.S,v 1.2 2013/08/19 02:20:06 matt Exp $) +RCSID($NetBSD: strchr_naive.S,v 1.3 2013/08/19 02:22:25 matt Exp $) /* LINTSTUB: char * strchr(const char *, int) */ ENTRY(strchr) +#ifdef __thumb__ + movs r3, #0xff + ands r1, r1, r3 /* restrict to a byte value */ +1: ldrb r3, [r0] /* read a byte */ + cmp r3, r1 /* does it match? */ + beq 2f /* yes, set return value */ + adds r0, r0, #1 /* advance to next byte */ +#ifdef _ARM_ARCH_T2 + cbnz r3, 1b /* was it a NUL? no, get next byte */ +#else + cmp r3, #0 /* was it a NUL? */ + bne 1b /* no, get next byte */ +#endif + movs r0, #0 /* set return to NULL */ +2: RET /* return */ +#else mov r2, r0 /* using r0 as return value */ mov r0, #0 /* default to no match */ and r1, r1, #0xff /* restrict to a byte value */ @@ -41,4 +57,5 @@ ENTRY(strchr) cmpne r3, #0 /* no, was it a NUL? */ bne 1b /* no, get next byte */ RET +#endif END(strchr)
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 02:24:09 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strrchr_naive.S Log Message: ip - r2 teq - cmp To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/strrchr_naive.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strrchr_naive.S diff -u src/common/lib/libc/arch/arm/string/strrchr_naive.S:1.1 src/common/lib/libc/arch/arm/string/strrchr_naive.S:1.2 --- src/common/lib/libc/arch/arm/string/strrchr_naive.S:1.1 Tue Jan 15 02:03:30 2013 +++ src/common/lib/libc/arch/arm/string/strrchr_naive.S Mon Aug 19 02:24:09 2013 @@ -28,17 +28,17 @@ */ #include machine/asm.h -RCSID($NetBSD: strrchr_naive.S,v 1.1 2013/01/15 02:03:30 matt Exp $) +RCSID($NetBSD: strrchr_naive.S,v 1.2 2013/08/19 02:24:09 matt Exp $) /* LINTSTUB: char * strrchr(const char *, int) */ ENTRY(strrchr) - mov ip, r0 /* using r0 as return value */ + mov r2, r0 /* using r0 as return value */ mov r0, #0 /* default to no match */ and r1, r1, #0xff /* restrict to a byte value */ -1: ldrb r3, [ip], #1 /* read a byte */ +1: ldrb r3, [r2], #1 /* read a byte */ cmp r3, r1 /* does it match? */ - subeq r0, ip, #1 /* yes, set return value to point to it */ - teq r3, #0 /* was it a NUL? */ + subeq r0, r2, #1 /* yes, set return value to point to it */ + cmp r3, #0 /* was it a NUL? */ bne 1b /* no, get next byte */ RET END(strrchr)
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 02:36:27 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strrchr_naive.S Log Message: Thumbify To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/string/strrchr_naive.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strrchr_naive.S diff -u src/common/lib/libc/arch/arm/string/strrchr_naive.S:1.2 src/common/lib/libc/arch/arm/string/strrchr_naive.S:1.3 --- src/common/lib/libc/arch/arm/string/strrchr_naive.S:1.2 Mon Aug 19 02:24:09 2013 +++ src/common/lib/libc/arch/arm/string/strrchr_naive.S Mon Aug 19 02:36:27 2013 @@ -28,17 +28,33 @@ */ #include machine/asm.h -RCSID($NetBSD: strrchr_naive.S,v 1.2 2013/08/19 02:24:09 matt Exp $) +RCSID($NetBSD: strrchr_naive.S,v 1.3 2013/08/19 02:36:27 matt Exp $) /* LINTSTUB: char * strrchr(const char *, int) */ ENTRY(strrchr) mov r2, r0 /* using r0 as return value */ - mov r0, #0 /* default to no match */ + movs r0, #0 /* default to no match */ +#ifdef __thumb__ + movs r3, #0xff + ands r1, r1, r3 /* restrict to a byte value */ +1: ldrb r3, [r2] /* read a byte */ + cmp r3, r1 /* does it match? */ + bne 2f /* no, go and advance */ + mov r0, r2 /* yes, set return value to point to it */ +2: adds r2, r2, #1 /* advance to next byte */ +#ifdef _ARM_ARCH_T2 + cbnz r3, 1b /* was it a NUL? no, get next byte */ +#else + cmp r3, #0 /* was it a NUL? */ + bne 1b /* no, get next byte */ +#endif +#else and r1, r1, #0xff /* restrict to a byte value */ 1: ldrb r3, [r2], #1 /* read a byte */ cmp r3, r1 /* does it match? */ subeq r0, r2, #1 /* yes, set return value to point to it */ cmp r3, #0 /* was it a NUL? */ bne 1b /* no, get next byte */ +#endif RET END(strrchr)
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 02:37:12 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: memmove.S Log Message: Add END() To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/arch/arm/string/memmove.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/memmove.S diff -u src/common/lib/libc/arch/arm/string/memmove.S:1.5 src/common/lib/libc/arch/arm/string/memmove.S:1.6 --- src/common/lib/libc/arch/arm/string/memmove.S:1.5 Sun Aug 11 04:56:32 2013 +++ src/common/lib/libc/arch/arm/string/memmove.S Mon Aug 19 02:37:12 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: memmove.S,v 1.5 2013/08/11 04:56:32 matt Exp $ */ +/* $NetBSD: memmove.S,v 1.6 2013/08/19 02:37:12 matt Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -31,10 +31,6 @@ #include machine/asm.h -#if defined(__ARM_EABI__) !defined(BCOPY) -STRONG_ALIAS(__aeabi_memmove, memmove) -#endif - #ifndef _BCOPY /* LINTSTUB: Func: void *memmove(void *, const void *, size_t) */ ENTRY(memmove) @@ -583,3 +579,12 @@ ENTRY(bcopy) .Lmemmove_bsrcul1l4: add r1, r1, #1 b .Lmemmove_bl4 +#ifndef _BCOPY +END(memmove) +#else +END(bcopy) +#endif + +#if defined(__ARM_EABI__) !defined(BCOPY) +STRONG_ALIAS(__aeabi_memmove, memmove) +#endif
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 02:54:02 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strcat_naive.S Log Message: Thumbify To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/strcat_naive.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strcat_naive.S diff -u src/common/lib/libc/arch/arm/string/strcat_naive.S:1.1 src/common/lib/libc/arch/arm/string/strcat_naive.S:1.2 --- src/common/lib/libc/arch/arm/string/strcat_naive.S:1.1 Mon Jan 14 16:36:15 2013 +++ src/common/lib/libc/arch/arm/string/strcat_naive.S Mon Aug 19 02:54:02 2013 @@ -29,10 +29,34 @@ #include machine/asm.h -RCSID($NetBSD: strcat_naive.S,v 1.1 2013/01/14 16:36:15 matt Exp $) +RCSID($NetBSD: strcat_naive.S,v 1.2 2013/08/19 02:54:02 matt Exp $) ENTRY(strcat) mov ip, r0 /* need to preserve r0 */ +#if defined(__thumb__) +1: ldrb r2, [r0] /* load next byte */ + adds r0, r0, #1 /* advance */ +#if defined(_ARM_ARCH_T2) + cbnz r2, 1b /* was it a NUL? no, get next byte */ +#else + cmp r2, #0 /* was it a NUL? */ + bne 1b /* no, get next byte */ +#endif + subs r0, r0, #1 /* back up one to the NUL */ + subs r1, r1, r0 /* save one increment */ +2: ldrb r2, [r1, r0] /* load next byte from append */ + strb r2, [r0] /* store it */ + adds r0, r0, #1 /* advance */ +#if defined(_ARM_ARCH_T2) + cbnz r2, 1b /* was it a NUL? no, get next byte */ +#else + cmp r2, #0 /* was it a NUL? */ + bne 2b /* no, get next byte */ +#endif + mov r0, ip /* restore dst address */ + RET/* return */ +#else /* !__thumb__ */ + mov ip, r0 /* need to preserve r0 */ 1: ldrb r2, [ip], #1 /* load next byte */ teq r2, #0 /* was it a NUL? */ bne 1b /* no, get next byte */ @@ -42,4 +66,5 @@ ENTRY(strcat) teq r2, #0 /* was it a NUL? */ bne 2b /* no, get next byte */ RET/* return */ +#endif END(strcat)
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 02:55:19 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: ffs.S Log Message: Add END() and clarify thumb/arm To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/string/ffs.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/ffs.S diff -u src/common/lib/libc/arch/arm/string/ffs.S:1.3 src/common/lib/libc/arch/arm/string/ffs.S:1.4 --- src/common/lib/libc/arch/arm/string/ffs.S:1.3 Sun Aug 11 05:02:35 2013 +++ src/common/lib/libc/arch/arm/string/ffs.S Mon Aug 19 02:55:19 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ffs.S,v 1.3 2013/08/11 05:02:35 matt Exp $ */ +/* $NetBSD: ffs.S,v 1.4 2013/08/19 02:55:19 matt Exp $ */ /* * Copyright (c) 2001 Christopher Gilbert * All rights reserved. @@ -30,7 +30,7 @@ #include machine/asm.h -RCSID($NetBSD: ffs.S,v 1.3 2013/08/11 05:02:35 matt Exp $) +RCSID($NetBSD: ffs.S,v 1.4 2013/08/19 02:55:19 matt Exp $) /* * ffs - find first set bit, this algorithm isolates the first set @@ -45,17 +45,23 @@ RCSID($NetBSD: ffs.S,v 1.3 2013/08/11 0 * 16 Feb 1994. */ WEAK_ALIAS(__ffssi2,ffs) +#if (defined(_ARM_ARCH_5) !defined(__thumb__)) || defined(_ARM_ARCH_T2) +#if defined(_ARM_ARCH_T2) ENTRY(ffs) -#ifdef _ARM_ARCH_5 +#else +ARM_ENTRY(ffs) +#endif /* (X -X) gives LSB or zero. */ - rsb r1, r0, #0 + neg r1, r0 and r0, r0, r1 clz r0, r0 rsb r0, r0, #32 RET +END(ffs) #else +ARM_ENTRY(ffs) /* Standard trick to isolate bottom bit in r0 or 0 if r0 = 0 on entry */ - rsb r1, r0, #0 + neg r1, r0 andsr0, r0, r1 /* * now r0 has at most one set bit, call this X @@ -82,4 +88,5 @@ ENTRY(ffs) .byte 10, 0, 0, 25, 0, 0, 21, 27 /* 40-47 */ .byte 31, 0, 0, 0, 0, 24, 0, 20 /* 48-55 */ .byte 30, 0, 23, 19, 29, 18, 17, 0 /* 56-63 */ +END(ffs) #endif
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 00:36:29 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strcat_arm.S Log Message: Add .cfi ops if EABI. Thumbify. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/string/strcat_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 00:56:12 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strcmp.S Log Message: Thumbify To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/strcmp.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 00:57:25 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strncmp.S Log Message: Thumbify To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/strncmp.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 01:08:53 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: memcpy_xscale.S Log Message: Add END(memcpy) To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/string/memcpy_xscale.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 01:08:29 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strchr.S strlen.S strnlen.S strrchr.S Log Message: For Thumb, use naive version To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/string/strchr.S \ src/common/lib/libc/arch/arm/string/strlen.S \ src/common/lib/libc/arch/arm/string/strrchr.S cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/strnlen.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 01:12:08 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strlcat_arm.S Log Message: Add .cfi for __ARM_EABI__ Thumbify To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/strlcat_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 01:17:32 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strlen_arm.S Log Message: For EABI, add .cfi ops To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/string/strlen_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 02:07:22 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strlen_naive.S Log Message: teq - cmp ip - r2 add/sub - adds/subs (thumbify part 1) To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/string/strlen_naive.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 02:08:41 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strlen_naive.S Log Message: Change previous use of r2 to r3 To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/string/strlen_naive.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 02:11:03 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strlen_naive.S Log Message: Use ip as a temporary To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/arch/arm/string/strlen_naive.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 02:13:14 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strlen_naive.S Log Message: Thumbify To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/common/lib/libc/arch/arm/string/strlen_naive.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 02:20:06 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strchr_naive.S Log Message: ip - r2 teq - cmp To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/strchr_naive.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Mon Aug 19 02:22:25 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strchr_naive.S Log Message: Thumbify To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/string/strchr_naive.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.