public inbox for linux-mips@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: kernel: Remove $0 clobber from `mult_sh_align_mod'
@ 2026-03-28 14:29 Maciej W. Rozycki
  2026-04-06 12:33 ` Thomas Bogendoerfer
  0 siblings, 1 reply; 2+ messages in thread
From: Maciej W. Rozycki @ 2026-03-28 14:29 UTC (permalink / raw)
  To: Thomas Bogendoerfer; +Cc: linux-mips, linux-kernel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-06 12:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox