Skip to content

Commit

Permalink
Mark some instructions as NOPs (#553)
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Goodman authored Oct 11, 2021
1 parent a144c17 commit e737070
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/Arch/AArch32/Decode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2410,13 +2410,18 @@ static bool TryMoveSpecialRegisterAndHintsI(Instruction &inst, uint32_t bits) {
return false;
}

if (strstr(instruction, "NOP") || strstr(instruction, "HINT")) {
inst.category = Instruction::kCategoryNoOp;
} else {
inst.category = Instruction::kCategoryNormal;
}

// A NOP is still conditional:
// if ConditionPassed() then
// EncodingSpecificOperations();
// // Do nothing
inst.function = instruction;
DecodeCondition(inst, enc.cond);
inst.category = Instruction::kCategoryNormal;
return true;
}

Expand Down

0 comments on commit e737070

Please sign in to comment.