Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 20 Apr 2021 16:15:19 -0300
From: √Črico Nogueira <ericonr@...root.org>
To: musl@...ts.openwall.com
Cc: √Črico Nogueira <ericonr@...root.org>
Subject: [PATCH] shorten __aeabi_memset by one instruction

when building for armhf, this makes libc.so text smaller by 4 bytes:
606619 to 606615
---
 src/string/arm/__aeabi_memset.s | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/string/arm/__aeabi_memset.s b/src/string/arm/__aeabi_memset.s
index f9f60583..980774e8 100644
--- a/src/string/arm/__aeabi_memset.s
+++ b/src/string/arm/__aeabi_memset.s
@@ -24,8 +24,7 @@ __aeabi_memset:
 	cmp   r1, #0
 	beq   2f
 	adds  r1, r0, r1
-1:	strb  r2, [r0]
-	adds  r0, r0, #1
+1:	strb  r2, [r0], #1
 	cmp   r1, r0
 	bne   1b
 2:	bx    lr
-- 
2.31.1

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.