summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/BPF/Disassembler
diff options
context:
space:
mode:
authorJiong Wang <jiwang@tilera.com>2019-02-07 10:43:09 +0000
committerJiong Wang <jiwang@tilera.com>2019-02-07 10:43:09 +0000
commit66b18e575571da027e31e4db07500835dcefb7f7 (patch)
tree0cf37e6b90ac34fbd8cbf9baa57b2a9781c2d40a /llvm/lib/Target/BPF/Disassembler
parent638110a20883df1ca86d2046ec5263b5af899bf9 (diff)
downloadbcm5719-llvm-66b18e575571da027e31e4db07500835dcefb7f7.tar.gz
bcm5719-llvm-66b18e575571da027e31e4db07500835dcefb7f7.zip
[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: Yonghong Song <yhs@fb.com> Signed-off-by: Jiong Wang <jiong.wang@netronome.com> llvm-svn: 353384
Diffstat (limited to 'llvm/lib/Target/BPF/Disassembler')
-rw-r--r--llvm/lib/Target/BPF/Disassembler/BPFDisassembler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/BPF/Disassembler/BPFDisassembler.cpp b/llvm/lib/Target/BPF/Disassembler/BPFDisassembler.cpp
index 43de8b6ebb3..ed09e446e73 100644
--- a/llvm/lib/Target/BPF/Disassembler/BPFDisassembler.cpp
+++ b/llvm/lib/Target/BPF/Disassembler/BPFDisassembler.cpp
@@ -39,7 +39,7 @@ public:
BPF_STX = 0x3,
BPF_ALU = 0x4,
BPF_JMP = 0x5,
- BPF_RES = 0x6,
+ BPF_JMP32 = 0x6,
BPF_ALU64 = 0x7
};
OpenPOWER on IntegriCloud