A32/translate_thumb: Add helper function for raising exceptions
Similar to the variant within the ARM-mode translator visitor. This will be used in subsequent changes to implement the hint instructions introduced in ARMv7.
This commit is contained in:
parent
64879396f6
commit
07699b47ba
1 changed files with 7 additions and 0 deletions
|
@ -41,6 +41,13 @@ struct ThumbTranslatorVisitor final {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool RaiseException(Exception exception) {
|
||||||
|
ir.BranchWritePC(ir.Imm32(ir.current_location.PC() + 2));
|
||||||
|
ir.ExceptionRaised(exception);
|
||||||
|
ir.SetTerm(IR::Term::CheckHalt{IR::Term::ReturnToDispatch{}});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// LSLS <Rd>, <Rm>, #<imm5>
|
// LSLS <Rd>, <Rm>, #<imm5>
|
||||||
bool thumb16_LSL_imm(Imm<5> imm5, Reg m, Reg d) {
|
bool thumb16_LSL_imm(Imm<5> imm5, Reg m, Reg d) {
|
||||||
const u8 shift_n = imm5.ZeroExtend<u8>();
|
const u8 shift_n = imm5.ZeroExtend<u8>();
|
||||||
|
|
Loading…
Reference in a new issue