linux/arch/loongarch
Tiezhu Yang 4eb54230b0 LoongArch: BPF: Adjust the parameter of emit_jirl()
[ Upstream commit c1474bb0b7 ]

The branch instructions beq, bne, blt, bge, bltu, bgeu and jirl belong
to the format reg2i16, but the sequence of oprand is different for the
instruction jirl. So adjust the parameter order of emit_jirl() to make
it more readable correspond with the Instruction Set Architecture manual.

Here are the instruction formats:

  beq     rj, rd, offs16
  bne     rj, rd, offs16
  blt     rj, rd, offs16
  bge     rj, rd, offs16
  bltu    rj, rd, offs16
  bgeu    rj, rd, offs16
  jirl    rd, rj, offs16

Link: https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html#branch-instructions
Suggested-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-01-02 10:32:05 +01:00
..
boot loongarch: efi: enable generic EFI compressed boot 2022-09-20 09:50:31 +02:00
configs mm: z3fold: deprecate CONFIG_Z3FOLD 2024-10-10 11:58:02 +02:00
crypto LoongArch/crypto: Clean up useless assignment operations 2024-04-03 15:28:36 +02:00
include LoongArch: BPF: Adjust the parameter of emit_jirl() 2025-01-02 10:32:05 +01:00
kernel LoongArch: BPF: Adjust the parameter of emit_jirl() 2025-01-02 10:32:05 +01:00
lib LoongArch: Add KASAN (Kernel Address Sanitizer) support 2023-09-06 22:54:16 +08:00
mm LoongArch: Fix sleeping in atomic context for PREEMPT_RT 2024-12-14 20:00:15 +01:00
net LoongArch: BPF: Adjust the parameter of emit_jirl() 2025-01-02 10:32:05 +01:00
pci LoongArch: Fix memleak in pci_acpi_scan_root() 2024-10-17 15:24:20 +02:00
power LoongArch: Export some arch-specific pm interfaces 2023-06-29 20:58:44 +08:00
vdso LoongArch: Fix build failure with GCC 15 (-std=gnu23) 2024-12-09 10:32:31 +01:00
Kbuild LoongArch: Add BPF JIT support 2022-10-12 16:36:20 +08:00
Kconfig LoongArch: Select HAVE_ARCH_SECCOMP to use the common SECCOMP menu 2024-03-01 13:34:55 +01:00
Kconfig.debug LoongArch: Add prologue unwinder support 2022-08-12 13:10:11 +08:00
Makefile kbuild: unify vdso_install rules 2024-06-12 11:12:32 +02:00