Skip to content
Commit 66b18e57 authored by Jiong Wang's avatar Jiong Wang
Browse files

[BPF] add code-gen support for JMP32 instructions



JMP32 instructions has been added to eBPF ISA. They are 32-bit variants of
existing BPF conditional jump instructions, but the comparison happens on
low 32-bit sub-register only, therefore some unnecessary extensions could
be saved.

JMP32 instructions will only be available for -mcpu=v3. Host probe hook has
been updated accordingly.

JMP32 instructions will only be enabled in code-gen when -mattr=+alu32
enabled, meaning compiling the program using sub-register mode.

For JMP32 encoding, it is a new instruction class, and is using the
reserved eBPF class number 0x6.

This patch has been tested by compiling and running kernel bpf selftests
with JMP32 enabled.

Acked-by: default avatarYonghong Song <yhs@fb.com>
Signed-off-by: default avatarJiong Wang <jiong.wang@netronome.com>
llvm-svn: 353384
parent 638110a2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment