From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Rosen Penev <rosenp@gmail.com>
Cc: linux-mips@vger.kernel.org, Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <nick.desaulniers+lkml@gmail.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
open list <linux-kernel@vger.kernel.org>,
"open list:CLANG/LLVM BUILD SUPPORT:Keyword:b(?i:clang|llvm)b"
<llvm@lists.linux.dev>
Subject: Re: [PATCH] mips: cps: Assemble jr.hb with an R2 ISA level
Date: Tue, 26 May 2026 16:53:39 +0200 [thread overview]
Message-ID: <ahWz82FORj2pshsD@alpha.franken.de> (raw)
In-Reply-To: <20260507232323.489383-1-rosenp@gmail.com>
On Thu, May 07, 2026 at 04:23:23PM -0700, Rosen Penev wrote:
> A MIPS allmodconfig built with LLVM can select CPU_MIPS32_R1 together
> with MIPS_MT_SMP. In that configuration clang invokes the integrated
> assembler with -march=mips32, and the MIPS MT path in cps-vec.S fails
> to assemble two jr.hb instructions:
>
> arch/mips/kernel/cps-vec.S:376:2: error: instruction requires
> a CPU feature not currently enabled
>
> arch/mips/kernel/cps-vec.S:490:4: error: instruction requires
> a CPU feature not currently enabled
>
> The earlier jr.hb in the same file is already assembled inside a .set
> MIPS_ISA_LEVEL_RAW scope. The two failing sites are reached after
> popping back to the file's base ISA level, so LLVM correctly rejects
> them for an R1 target.
>
> Wrap those jr.hb instructions in the same ISA-level push/pop used by
> the working site. This keeps the MT code unchanged while making the
> required R2 hazard-branch encoding explicit to the assembler.
>
> Assisted-by: Codex:GPT-5.5
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
> arch/mips/kernel/cps-vec.S | 6 ++++++
> 1 file changed, 6 insertions(+)
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-05-26 15:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-07 23:23 [PATCH] mips: cps: Assemble jr.hb with an R2 ISA level Rosen Penev
2026-05-08 12:59 ` Maciej W. Rozycki
2026-05-26 14:53 ` 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=ahWz82FORj2pshsD@alpha.franken.de \
--to=tsbogend@alpha.franken.de \
--cc=justinstitt@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=nick.desaulniers+lkml@gmail.com \
--cc=rosenp@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.