Re: [PATCH bpf-next v4 2/3] MIPS: uasm: Add signed div/mod and sign-extension emitters

From: bot+bpf-ci

Date: Fri Sep 11 2026 - 18:31:09 EST


> diff --git a/arch/mips/include/asm/uasm.h b/arch/mips/include/asm/uasm.h
> index b43bfd445252..adea35df0f8d 100644
> --- a/arch/mips/include/asm/uasm.h
> +++ b/arch/mips/include/asm/uasm.h
> @@ -85,15 +85,20 @@ Ip_u1u2(_ctc1);
> Ip_u2u1(_ctcmsa);
> Ip_u2u1s3(_daddiu);
> Ip_u3u1u2(_daddu);
> +Ip_u1u2(_ddiv);
> +Ip_u3u1u2(_ddiv_r6);
> Ip_u1u2(_ddivu);
> Ip_u3u1u2(_ddivu_r6);

[ ... ]

> @@ -156,6 +162,8 @@ Ip_u2s3u1(_sb);
> Ip_u2s3u1(_sc);
> Ip_u2s3u1(_scd);
> Ip_u2s3u1(_sd);
> +Ip_u2u1(_seb);
> +Ip_u2u1(_seh);
> Ip_u3u1u2(_seleqz);
> Ip_u3u1u2(_selnez);
> Ip_u2s3u1(_sh);

[ ... ]

> diff --git a/arch/mips/mm/uasm.c b/arch/mips/mm/uasm.c
> index 125140979d62..139afb0e14cd 100644
> --- a/arch/mips/mm/uasm.c
> +++ b/arch/mips/mm/uasm.c
> @@ -49,19 +49,21 @@ enum opcode {

[ ... ]

> insn_sb, insn_sc, insn_scd, insn_seb, insn_seh,
> insn_seleqz, insn_selnez, insn_sd, insn_sh, insn_sll,

[ ... ]

> @@ -353,6 +361,8 @@ I_u2s3u1(_sb)
> I_u2s3u1(_sc)
> I_u2s3u1(_scd)
> I_u2s3u1(_sd)
> +I_u2u1(_seb)
> +I_u2u1(_seh)
> I_u3u1u2(_seleqz)
> I_u3u1u2(_selnez)
> I_u2s3u1(_sh)

This isn't a bug, but would it read better to add the SEB and SEH emitters
together with their first caller in the BPF_MOVSX series?

A tree-wide search at series end shows uasm_i_seb() and uasm_i_seh() have
no callers yet. The six division emitters (div, div_r6, mod, ddiv, ddiv_r6,
dmod) added alongside them do get used by the final patch in this series.
The commit message notes SEB/SEH are for a different follow-on series,
and CONFIG_CPU_MICROMIPS kernels would hit build_insn()'s panic for them
since arch/mips/mm/uasm-micromips.c isn't updated with their encodings.


---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md

CI run summary: https://github.com/kernel-patches/bpf/actions/runs/34651585043