[llvm-mc-fuzzer] Support untested instruction discovery for variable length instructi...
authorDaniel Sanders <daniel.sanders@imgtec.com>
Tue, 22 Sep 2015 09:22:53 +0000 (09:22 +0000)
committerDaniel Sanders <daniel.sanders@imgtec.com>
Tue, 22 Sep 2015 09:22:53 +0000 (09:22 +0000)
commite59aef6de7241e4e774a210e273f8cf48f6761fd
treeb615f4cb4a5af114fc38b080189b818cc78f30f2
parentde8d7c41ca0f6faf525ad40f070a28e6822cd5a4
[llvm-mc-fuzzer] Support untested instruction discovery for variable length instruction sets like microMIPS.

Summary:
For fixed length instructions, we can use -max_len to limit the fuzzer to a
single instruction. This doesn't work for variable length instruction sets
since a 4-byte input could consist of one 4-byte instruction or two 2-byte
instructions.

This patch adds a --insn-limit to llvm-mc-fuzzer to limit the input in
terms of instructions processed.

Reviewers: kcc

Subscribers: kcc, llvm-commits

Differential Revision: http://reviews.llvm.org/D12960

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248253 91177308-0d34-0410-b5e6-96231b3b80d8
tools/llvm-mc-fuzzer/llvm-mc-fuzzer.cpp