thumb32: Implement BXJ

We handle this as a regular BX call, given we don't support Jazelle.
This commit is contained in:
Lioncash 2021-02-22 07:41:29 -05:00
parent 29d7cbd899
commit 89838c5ce4
3 changed files with 10 additions and 1 deletions

View file

@ -111,7 +111,7 @@ INST(thumb32_DSB, "DSB", "1111001110111111100011
INST(thumb32_DMB, "DMB", "1111001110111111100011110101oooo") INST(thumb32_DMB, "DMB", "1111001110111111100011110101oooo")
INST(thumb32_ISB, "ISB", "1111001110111111100011110110oooo") INST(thumb32_ISB, "ISB", "1111001110111111100011110110oooo")
//INST(thumb32_BXJ, "BXJ", "111100111100----1000111100000000") INST(thumb32_BXJ, "BXJ", "111100111100mmmm1000111100000000")
//INST(thumb32_ERET, "ERET", "11110011110111101000111100000000") //INST(thumb32_ERET, "ERET", "11110011110111101000111100000000")
//INST(thumb32_SUBS_pc_lr, "SUBS PC, LR", "111100111101111010001111--------") //INST(thumb32_SUBS_pc_lr, "SUBS PC, LR", "111100111101111010001111--------")

View file

@ -7,6 +7,14 @@
namespace Dynarmic::A32 { namespace Dynarmic::A32 {
bool ThumbTranslatorVisitor::thumb32_BXJ(Reg m) {
if (m == Reg::PC) {
return UnpredictableInstruction();
}
return thumb16_BX(m);
}
bool ThumbTranslatorVisitor::thumb32_CLREX() { bool ThumbTranslatorVisitor::thumb32_CLREX() {
ir.ClearExclusive(); ir.ClearExclusive();
return true; return true;

View file

@ -164,6 +164,7 @@ struct ThumbTranslatorVisitor final {
bool thumb32_MOVW_imm(Imm<1> imm1, Imm<4> imm4, Imm<3> imm3, Reg d, Imm<8> imm8); bool thumb32_MOVW_imm(Imm<1> imm1, Imm<4> imm4, Imm<3> imm3, Reg d, Imm<8> imm8);
// thumb32 miscellaneous control instructions // thumb32 miscellaneous control instructions
bool thumb32_BXJ(Reg m);
bool thumb32_CLREX(); bool thumb32_CLREX();
bool thumb32_DMB(Imm<4> option); bool thumb32_DMB(Imm<4> option);
bool thumb32_DSB(Imm<4> option); bool thumb32_DSB(Imm<4> option);