From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,URIBL_BLACK autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 28538 invoked from network); 21 Apr 2021 12:33:21 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 21 Apr 2021 12:33:21 -0000 Received: (qmail 21626 invoked by uid 550); 21 Apr 2021 12:33:17 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 21602 invoked from network); 21 Apr 2021 12:33:17 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=3pqI19ZO1vBHXRp0/pn3YSMMdlzYFReGaiN+jXWmyk4=; b=njun4scrLehfhcKiE+O/d6lhcpkof+oWQdxJ5KXGUZzvGBZ8qYHobceE3sS5Q4lZuk VR6C38rTWVsUromya8LDGvuYH5QoMOoy5Sww7Sgij43JF2pAXUnvI8ii+5QpSilAwRBJ PLS0JU7FP/iMUZ6Mh4/Ru7ZBGtrQC3ALm9E+Tt9hcvfAqNXm8G1MaJBcplBSfYimNIFk DHkchHVm5lYnOSQDR3LZYwKX/kQFe9v0gy5jJl5gmS1NDLBrI61yGtHw+VQoZqXxVdn1 nPGC8ltCOCqOVVL+Rg86Gxoi/U5QCt0KA77Ox1Xug9OmmTag5s1gpivyfHb66l0ZOn/a VK8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=3pqI19ZO1vBHXRp0/pn3YSMMdlzYFReGaiN+jXWmyk4=; b=dAfs3DKRpKgYryqiRtqSm0AOqH45SvirilZhG8R/Vsu8Ss/GCf8JVxLO9nUwxnoW59 +ivsFAZ7uoLRsOcnr7a//0GoAP8sYFu9l+w57dzETrzSK189iFO73796geaWVQT7ccen y6EUZHuWbc1jOiY11xMejknjNbY6zEf8l+tjPkKE0mS9EaO+CGOk+ZESuY3pHlhVq2EM yW8YpwCwOZtRm9jo+fPZMWxbPxgz6Kjr+l2VQ35dHQZsg9qJJp0oXNIRJ1hDG7d+vuud MlK+6UUVwNKJrDTzGWB1UzOPlHcxapsxFmeCn3SgEcBm3agLlfMp9lboAmMFQJ/br+Vu lDGg== X-Gm-Message-State: AOAM533VRQX0byQ1wSU9gM3D9AFhvM+AUkBKL/jDkbYDJCnLpD3DSBgO N0IfXDE3dOLx1Gh/wFF5futJomxWGgSpXfppMQGxfIm1 X-Google-Smtp-Source: ABdhPJzn7qKe3Z565Wie8hYpEpeZSrZ0BZmiIGoutZR0cY2DzoQikcl21vE4wSCeXMISokSwfU3m6vUIEB+sOtBdw2E= X-Received: by 2002:aa7:d917:: with SMTP id a23mr38945640edr.80.1619008385556; Wed, 21 Apr 2021 05:33:05 -0700 (PDT) MIME-Version: 1.0 References: <20210420191519.23822-1-ericonr@disroot.org> <20210420191519.23822-5-ericonr@disroot.org> <20210421082458.GI2799122@port70.net> In-Reply-To: <20210421082458.GI2799122@port70.net> From: Jesse DeGuire Date: Wed, 21 Apr 2021 08:32:54 -0400 Message-ID: To: musl@lists.openwall.com, =?UTF-8?Q?=C3=89rico_Nogueira?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [musl] [PATCH] shorten __aeabi_memset by one instruction On Wed, Apr 21, 2021 at 4:25 AM Szabolcs Nagy wrote: > > * =C3=89rico Nogueira [2021-04-20 16:15:19 -0300]: > > 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_m= emset.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 > > this is not available before armv7 as thumb instruction (and it > has 32bit thumb encoding, so you replace two 16bit instructions > with a 32bit one.) > > normally this asm is compiled in arm mode even if your toolchain > defaults to thumb (i'm not sure why), but if you select a cpu or > arch that only supports thumb then the assembler will try to use > thumb and fail e.g. on -march=3Darmv6-m (but i'm not sure if musl > supports that compilation mode throughout) > Musl currently does not build on Thumb1-only devices (Armv6-m and Armv8-m.base). I submitted a patch some time ago to allow it to build, though life and other obstacles have made me much too slow in actually getting a functioning toolchain together to test it properly. > > cmp r1, r0 > > bne 1b > > 2: bx lr > > -- > > 2.31.1