fuzz_with_unicorn: Skip instructions that need to be interpreted
This commit is contained in:
parent
4be55b8b84
commit
ca38225e08
3 changed files with 4 additions and 2 deletions
|
@ -84,7 +84,7 @@ const Block::InstructionList& Block::Instructions() const {
|
||||||
return instructions;
|
return instructions;
|
||||||
}
|
}
|
||||||
|
|
||||||
Terminal Block::GetTerminal() const {
|
const Terminal& Block::GetTerminal() const {
|
||||||
return terminal;
|
return terminal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -118,7 +118,7 @@ public:
|
||||||
const InstructionList& Instructions() const;
|
const InstructionList& Instructions() const;
|
||||||
|
|
||||||
/// Gets the terminal instruction for this basic block.
|
/// Gets the terminal instruction for this basic block.
|
||||||
Terminal GetTerminal() const;
|
const Terminal& GetTerminal() const;
|
||||||
/// Sets the terminal instruction for this basic block.
|
/// Sets the terminal instruction for this basic block.
|
||||||
void SetTerminal(Terminal term);
|
void SetTerminal(Terminal term);
|
||||||
/// Replaces the terminal instruction for this basic block.
|
/// Replaces the terminal instruction for this basic block.
|
||||||
|
|
|
@ -66,6 +66,8 @@ restart:
|
||||||
bool should_continue = A64::TranslateSingleInstruction(block, location, instruction);
|
bool should_continue = A64::TranslateSingleInstruction(block, location, instruction);
|
||||||
if (!should_continue && !is_last_inst)
|
if (!should_continue && !is_last_inst)
|
||||||
goto restart;
|
goto restart;
|
||||||
|
if (!should_continue && boost::get<IR::Term::Interpret>(&block.GetTerminal()))
|
||||||
|
goto restart;
|
||||||
for (const auto& ir_inst : block)
|
for (const auto& ir_inst : block)
|
||||||
if (ir_inst.GetOpcode() == IR::Opcode::A64ExceptionRaised || ir_inst.GetOpcode() == IR::Opcode::A64CallSupervisor)
|
if (ir_inst.GetOpcode() == IR::Opcode::A64ExceptionRaised || ir_inst.GetOpcode() == IR::Opcode::A64CallSupervisor)
|
||||||
goto restart;
|
goto restart;
|
||||||
|
|
Loading…
Reference in a new issue