From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id 9BD472DB50 for ; Sat, 26 Oct 2024 22:14:35 +0200 (CEST) Received: (qmail 7523 invoked by uid 550); 26 Oct 2024 20:14:30 -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 x-ms-reactions: disallow Received: (qmail 7491 invoked from network); 26 Oct 2024 20:14:30 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alexrp.com; s=alexrp; t=1729973662; x=1730578462; darn=lists.openwall.com; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=SXZ0z87D7WYHO6Wl6Hxos/36Xajhwh6QUEHhtD17cT4=; b=OAC6mV/Td45zXi7vJeUhuP8+TP0WFvb4EmDqYLsRtpLVLCrFVb+gwHhx0lXcIVBlTS V2KMjoic41fnjQ5hAzHGOYLgOCp2+FMavGnEVzaTWCQQ47fPn4C2ZfW3+DFWRGtuFOWn 48xwFJshuGg7dHbSsT/UOSqRgo9wHYS7riPIouI/mimFCPZhWv7th+2RxWi/e025DTeF eh6lYQQdjS/sXgy37OsGCCjoZn79S06fVbB8YM9GQbRnWZixGEWIDAKdprtcg3sRhuLV wuVFhXTu4rBFyY+pdM0NQSFH6NebdNJ6bzYCthD+D4ThOiHAKblHp1cDWqXQ2PH99W6e 6DNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729973662; x=1730578462; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SXZ0z87D7WYHO6Wl6Hxos/36Xajhwh6QUEHhtD17cT4=; b=C9GynrukgIsl3co3oyyOv3tPt9MRYIS6ErQOkbcZQsYAC9TA2T+pCAPwNzDb8SlPe+ K/6h747iU3D9EWGOnpl7YAink7gvyKgOqNbYUei+NUWwyKfSObi3bfpNhFaYAqgVq8+e X7czb23wJ0nIC+Erv0DmftZGEfVTzIMiLY0CZaHCPTjnHHM4BQxw0a9hFgCJVcTaD1OZ WJPsf9XyFdyCXlIWQr7YGAqIPH29xrJM0mA1G3kZM8SlL3qKQ2crK2stAj9Td5OVfRr1 MB+aSf1KgodacykgrU3SwZ3qL9l4jfzGf3ImX+qNzSayBELf8SQQZf3X7DDm2zePhBne dWsw== X-Gm-Message-State: AOJu0Yz9wfunuwvTlBSGuHeoMgeASVbRVntJb++en5dM64ANsV1+HJ4y g1MCZKaoJa7xw8vLLYWXFw822cXrtzAWMu/uQrqt91y0uVGryvU5RMxYkN1qBoQtmqa4OY5hWT5 vH3uHcK8SeQv3fUMlE/afBeqYKjLK/4Cz5UKoSr9OhndIdxbA X-Google-Smtp-Source: AGHT+IEFbu/6NcVxkabvwqWBxu2uszyzeWMNYwE/sMByg4I4xF9hcBqUieHWPiU8IVp0otHcgr6pKxppd0Sc3q/NE1Q= X-Received: by 2002:a05:6000:154d:b0:37c:cd1d:b870 with SMTP id ffacd0b85a97d-380611ca1f9mr3840249f8f.29.1729973661806; Sat, 26 Oct 2024 13:14:21 -0700 (PDT) MIME-Version: 1.0 References: <20240918011842.26118-1-alex@alexrp.com> <20241022225838.GT10433@brightrain.aerifal.cx> In-Reply-To: <20241022225838.GT10433@brightrain.aerifal.cx> From: =?UTF-8?Q?Alex_R=C3=B8nne_Petersen?= Date: Sat, 26 Oct 2024 22:13:46 +0200 Message-ID: To: Rich Felker Cc: musl@lists.openwall.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [musl] [PATCH] mips: use `jr $ra` instead of `j $ra` to work around an LLVM assembler bug On Wed, Oct 23, 2024 at 12:58=E2=80=AFAM Rich Felker wrot= e: > > On Wed, Sep 18, 2024 at 03:18:42AM +0200, Alex R=C3=B8nne Petersen wrote: > > Details here: https://github.com/llvm/llvm-project/issues/107460 > > > > This patch works around the bug by just using the `jr $ra` form, which = also more > > precisely indicates the encoding intent anyway. > > --- > > crt/mips/crtn.s | 4 ++-- > > crt/mips64/crtn.s | 4 ++-- > > 2 files changed, 4 insertions(+), 4 deletions(-) > > > > diff --git a/crt/mips/crtn.s b/crt/mips/crtn.s > > index 506a04b7..92eb3d0e 100644 > > --- a/crt/mips/crtn.s > > +++ b/crt/mips/crtn.s > > @@ -3,11 +3,11 @@ > > .section .init > > lw $gp,24($sp) > > lw $ra,28($sp) > > - j $ra > > + jr $ra > > addu $sp,$sp,32 > > > > .section .fini > > lw $gp,24($sp) > > lw $ra,28($sp) > > - j $ra > > + jr $ra > > addu $sp,$sp,32 > > diff --git a/crt/mips64/crtn.s b/crt/mips64/crtn.s > > index f3930b24..8f090ed3 100644 > > --- a/crt/mips64/crtn.s > > +++ b/crt/mips64/crtn.s > > @@ -3,11 +3,11 @@ > > .section .init > > ld $gp,16($sp) > > ld $ra,24($sp) > > - j $ra > > + jr $ra > > daddu $sp,$sp,32 > > > > .section .fini > > ld $gp,16($sp) > > ld $ra,24($sp) > > - j $ra > > + jr $ra > > daddu $sp,$sp,32 > > -- > > 2.40.1 > > Thanks. Applying this with the same applied to mipsn32 too. Oops, I'd completely forgotten to apply it there because we hadn't yet imported musl's mipsn32 code in Zig. Thanks!