bpf: fix a bug for disassembling ld_pseudo inst

Signed-off-by: Yonghong Song <yhs@fb.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314469 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Yonghong Song 2017-09-28 22:47:34 +00:00
parent 86b6138b9a
commit df99c09b49

View File

@ -146,7 +146,8 @@ DecodeStatus BPFDisassembler::getInstruction(MCInst &Instr, uint64_t &Size,
if (Result == MCDisassembler::Fail) return MCDisassembler::Fail;
switch (Instr.getOpcode()) {
case BPF::LD_imm64: {
case BPF::LD_imm64:
case BPF::LD_pseudo: {
if (Bytes.size() < 16) {
Size = 0;
return MCDisassembler::Fail;