bpf: fix a bug for disassembling ld_pseudo inst

Signed-off-by: Yonghong Song <yhs@fb.com>
llvm-svn: 314469
This commit is contained in:
Yonghong Song 2017-09-28 22:47:34 +00:00
parent fb74cb1edf
commit ef29a84d48
1 changed files with 2 additions and 1 deletions

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;