summaryrefslogtreecommitdiff
path: root/scripts/objdiff
diff options
context:
space:
mode:
authorTiezhu Yang <yangtiezhu@loongson.cn>2026-08-17 22:07:24 +0800
committerHuacai Chen <chenhuacai@loongson.cn>2026-08-17 22:07:24 +0800
commit32a5e3eaa086c64c2ca9a4611769faae60716ae7 (patch)
treedfa5ff90a90846db25e8940c21cea2957e7bdfd1 /scripts/objdiff
parent434308885db42e7cc929e8466ac9eb7f69a999e0 (diff)
downloadlinux-32a5e3eaa086c64c2ca9a4611769faae60716ae7.tar.gz
linux-32a5e3eaa086c64c2ca9a4611769faae60716ae7.zip
LoongArch: BPF: Remove redundant zext jumping in move_imm()
In move_imm(), when an immediate hits the 12-bit unsigned range, an `ori rd, $zero, imm` instruction is emitted. According to the manual, the `ori` instruction inherently performs a logical or with zero-extended immediate operands against $zero, so the upper 32 bits of the destination register `rd` are already 0. However, the existing JIT code unconditionally executes `goto zext;` after `ori`, forcing it to fallthrough into `emit_zext_32()` to clear the upper 32 bits for 32-bit ALU operations. Fix this redundancy by directly returning from the function inside the `is_unsigned_imm12()` block. Acked-by: Hengqi Chen <hengqi.chen@gmail.com> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions