[bpf] add bigendian support to disassembler
authorAlexei Starovoitov <alexei.starovoitov@gmail.com>
Fri, 28 Apr 2017 16:51:01 +0000 (16:51 +0000)
committerAlexei Starovoitov <alexei.starovoitov@gmail.com>
Fri, 28 Apr 2017 16:51:01 +0000 (16:51 +0000)
commitf7bd5ebd3b62989f335efc0eb8263be40301a861
treed9e75876b92c76a1777ef56247f65f6dd9f664c5
parentea8702d393e28e2fdbd6ae70e08e65bcb1ead33b
[bpf] add bigendian support to disassembler

. swap 4-bit register encoding, 16-bit offset and 32-bit imm to support big endian archs
. add a test

Reported-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
llvm-svn: 301653
llvm/lib/Target/BPF/Disassembler/BPFDisassembler.cpp
llvm/test/CodeGen/BPF/mem_offset_be.ll [new file with mode: 0644]