bpf: disassembler support JMP32
authorJiong Wang <jiong.wang@netronome.com>
Sat, 26 Jan 2019 17:26:02 +0000 (12:26 -0500)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 26 Jan 2019 21:33:01 +0000 (13:33 -0800)
commit56cbd82ef0b3dc47a16beeebc8d9a9a9269093dc
treed4dd6f2a9bf40d89b471fcd2cb47feb81e4e6126
parent092ed0968bb648cd18e8a0430cd0a8a71727315c
bpf: disassembler support JMP32

This patch teaches disassembler about JMP32. There are two places to
update:

  - Class 0x6 now used by BPF_JMP32, not "unused".

  - BPF_JMP32 need to show comparison operands properly.
    The disassemble format is to add an extra "(32)" before the operands if
    it is a sub-register. A better disassemble format for both JMP32 and
    ALU32 just show the register prefix as "w" instead of "r", this is the
    format using by LLVM assembler.

Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Jiong Wang <jiong.wang@netronome.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/disasm.c