From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: "Maciej W. Rozycki" <macro@orcam.me.uk>
Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] MIPS: kernel: Remove $0 clobber from `mult_sh_align_mod'
Date: Mon, 6 Apr 2026 14:33:40 +0200 [thread overview]
Message-ID: <adOoJAYbhEvCNtfC@alpha.franken.de> (raw)
In-Reply-To: <alpine.DEB.2.21.2603281409240.60268@angie.orcam.me.uk>
On Sat, Mar 28, 2026 at 02:29:10PM +0000, Maciej W. Rozycki wrote:
> Remove rubbish $0 clobber added to inline asm within `mult_sh_align_mod'
> with the removal of support for GCC versions below 3.4 made with commit
> 57810ecb581a ("MIPS: Remove GCC_IMM_ASM & GCC_REG_ACCUM macros").
>
> Previously a macro was used that, depending on GCC version, expanded to
> either `accum' or $0. Since the latter choice was only a placeholder to
> keep the syntax consistent and the register referred is hardwired, there
> is no point in having it here as it has no effect on code generation.
>
> Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
> ---
> arch/mips/kernel/r4k-bugs64.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> linux-mips-cpu-bugs64-gcc-reg-accum-zero.diff
> Index: linux-macro/arch/mips/kernel/r4k-bugs64.c
> ===================================================================
> --- linux-macro.orig/arch/mips/kernel/r4k-bugs64.c
> +++ linux-macro/arch/mips/kernel/r4k-bugs64.c
> @@ -91,7 +91,7 @@ void mult_sh_align_mod(long *v1, long *v
> ".set pop"
> : "=&r" (lv1), "=r" (lw)
> : "r" (m1), "r" (m2), "r" (s), "I" (0)
> - : "hi", "lo", "$0");
> + : "hi", "lo");
> /* We have to use single integers for m1 and m2 and a double
> * one for p to be sure the mulsidi3 gcc's RTL multiplication
> * instruction has the workaround applied. Older versions of
applied to mips-next
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
prev parent reply other threads:[~2026-04-06 12:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-28 14:29 [PATCH] MIPS: kernel: Remove $0 clobber from `mult_sh_align_mod' Maciej W. Rozycki
2026-04-06 12:33 ` Thomas Bogendoerfer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=adOoJAYbhEvCNtfC@alpha.franken.de \
--to=tsbogend@alpha.franken.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=macro@orcam.me.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox