thumb32: Implement ISB

This commit is contained in:
Lioncash 2021-02-19 00:01:24 -05:00
parent 085147b5a4
commit 5543e4f9eb
3 changed files with 9 additions and 1 deletions

View file

@ -109,7 +109,7 @@ INST(thumb32_EOR_imm, "EOR (imm)", "11110v00100Snnnn0vvvdd
//INST(thumb32_CLREX, "CLREX", "111100111011----10-0----0010----") //INST(thumb32_CLREX, "CLREX", "111100111011----10-0----0010----")
INST(thumb32_DSB, "DSB", "1111001110111111100011110100oooo") INST(thumb32_DSB, "DSB", "1111001110111111100011110100oooo")
INST(thumb32_DMB, "DMB", "1111001110111111100011110101oooo") INST(thumb32_DMB, "DMB", "1111001110111111100011110101oooo")
//INST(thumb32_ISB, "ISB", "111100111011----10-0----0110----") INST(thumb32_ISB, "ISB", "1111001110111111100011110110oooo")
//INST(thumb32_BXJ, "BXJ", "111100111100----1000111100000000") //INST(thumb32_BXJ, "BXJ", "111100111100----1000111100000000")
//INST(thumb32_ERET, "ERET", "11110011110111101000111100000000") //INST(thumb32_ERET, "ERET", "11110011110111101000111100000000")

View file

@ -17,6 +17,13 @@ bool ThumbTranslatorVisitor::thumb32_DSB([[maybe_unused]] Imm<4> option) {
return true; return true;
} }
bool ThumbTranslatorVisitor::thumb32_ISB([[maybe_unused]] Imm<4> option) {
ir.InstructionSynchronizationBarrier();
ir.BranchWritePC(ir.Imm32(ir.current_location.PC() + 4));
ir.SetTerm(IR::Term::ReturnToDispatch{});
return false;
}
bool ThumbTranslatorVisitor::thumb32_UDF() { bool ThumbTranslatorVisitor::thumb32_UDF() {
return thumb16_UDF(); return thumb16_UDF();
} }

View file

@ -162,6 +162,7 @@ struct ThumbTranslatorVisitor final {
// thumb32 miscellaneous control instructions // thumb32 miscellaneous control instructions
bool thumb32_DMB(Imm<4> option); bool thumb32_DMB(Imm<4> option);
bool thumb32_DSB(Imm<4> option); bool thumb32_DSB(Imm<4> option);
bool thumb32_ISB(Imm<4> option);
bool thumb32_UDF(); bool thumb32_UDF();
// thumb32 branch instructions // thumb32 branch instructions