diff options
| author | 2026-08-17 22:07:24 +0800 | |
|---|---|---|
| committer | 2026-08-17 22:07:24 +0800 | |
| commit | 32a5e3eaa086c64c2ca9a4611769faae60716ae7 (patch) | |
| tree | dfa5ff90a90846db25e8940c21cea2957e7bdfd1 /tools/lib/python/kdoc/python_version.py | |
| parent | LoongArch: BPF: Implement branchless conditional move for TCC (diff) | |
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 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
