projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f48012f
)
LoongArch: BPF: Support unconditional bswap instructions
author
Hengqi Chen
<hengqi.chen@gmail.com>
Wed, 8 Nov 2023 06:12:16 +0000
(14:12 +0800)
committer
Huacai Chen
<chenhuacai@loongson.cn>
Wed, 8 Nov 2023 06:12:16 +0000
(14:12 +0800)
Add support for unconditional bswap instruction. Since LoongArch is
always little-endian, just treat unconditional bswap the same as big-
endian conversion.
Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/net/bpf_jit.c
patch
|
blob
|
history
diff --git
a/arch/loongarch/net/bpf_jit.c
b/arch/loongarch/net/bpf_jit.c
index ac9edf02675cbfd27236fdba96a107e572a75d7b..a8be6d4b058cd4338b23ef920fb294cd24e03023 100644
(file)
--- a/
arch/loongarch/net/bpf_jit.c
+++ b/
arch/loongarch/net/bpf_jit.c
@@
-731,6
+731,7
@@
static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx, bool ext
break;
case BPF_ALU | BPF_END | BPF_FROM_BE:
+ case BPF_ALU64 | BPF_END | BPF_FROM_LE:
switch (imm) {
case 16:
emit_insn(ctx, revb2h, dst, dst);