summaryrefslogtreecommitdiffstats
path: root/kernel/arch/arm64/net/bpf_jit.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/arch/arm64/net/bpf_jit.h')
-rw-r--r--kernel/arch/arm64/net/bpf_jit.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/arch/arm64/net/bpf_jit.h b/kernel/arch/arm64/net/bpf_jit.h
index de0a81a53..98a26ce82 100644
--- a/kernel/arch/arm64/net/bpf_jit.h
+++ b/kernel/arch/arm64/net/bpf_jit.h
@@ -110,6 +110,10 @@
/* Rd = Rn >> shift; signed */
#define A64_ASR(sf, Rd, Rn, shift) A64_SBFM(sf, Rd, Rn, shift, (sf) ? 63 : 31)
+/* Zero extend */
+#define A64_UXTH(sf, Rd, Rn) A64_UBFM(sf, Rd, Rn, 0, 15)
+#define A64_UXTW(sf, Rd, Rn) A64_UBFM(sf, Rd, Rn, 0, 31)
+
/* Move wide (immediate) */
#define A64_MOVEW(sf, Rd, imm16, shift, type) \
aarch64_insn_gen_movewide(Rd, imm16, shift, \