thumb32: Implement PUSH
This can be handled as an alias for STMDB.
This commit is contained in:
parent
9cb4790428
commit
1d0b705996
3 changed files with 6 additions and 1 deletions
|
@ -4,7 +4,7 @@
|
||||||
INST(thumb32_STMIA, "STMIA/STMEA", "1110100010W0nnnn0iiiiiiiiiiiiiii")
|
INST(thumb32_STMIA, "STMIA/STMEA", "1110100010W0nnnn0iiiiiiiiiiiiiii")
|
||||||
INST(thumb32_POP, "POP", "1110100010111101iiiiiiiiiiiiiiii")
|
INST(thumb32_POP, "POP", "1110100010111101iiiiiiiiiiiiiiii")
|
||||||
INST(thumb32_LDMIA, "LDMIA/LDMFD", "1110100010W1nnnniiiiiiiiiiiiiiii")
|
INST(thumb32_LDMIA, "LDMIA/LDMFD", "1110100010W1nnnniiiiiiiiiiiiiiii")
|
||||||
//INST(thumb32_PUSH, "PUSH", "1110100100101101----------------")
|
INST(thumb32_PUSH, "PUSH", "11101001001011010iiiiiiiiiiiiiii")
|
||||||
INST(thumb32_STMDB, "STMDB/STMFD", "1110100100W0nnnn0iiiiiiiiiiiiiii")
|
INST(thumb32_STMDB, "STMDB/STMFD", "1110100100W0nnnn0iiiiiiiiiiiiiii")
|
||||||
INST(thumb32_LDMDB, "LDMDB/LDMEA", "1110100100W1nnnniiiiiiiiiiiiiiii")
|
INST(thumb32_LDMDB, "LDMDB/LDMEA", "1110100100W1nnnniiiiiiiiiiiiiiii")
|
||||||
//INST(thumb32_SRS_1, "SRS", "1110100110-0--------------------")
|
//INST(thumb32_SRS_1, "SRS", "1110100110-0--------------------")
|
||||||
|
|
|
@ -105,6 +105,10 @@ bool ThumbTranslatorVisitor::thumb32_POP(Imm<16> reg_list) {
|
||||||
return thumb32_LDMIA(true, Reg::SP, reg_list);
|
return thumb32_LDMIA(true, Reg::SP, reg_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ThumbTranslatorVisitor::thumb32_PUSH(Imm<15> reg_list) {
|
||||||
|
return thumb32_STMDB(true, Reg::SP, reg_list);
|
||||||
|
}
|
||||||
|
|
||||||
bool ThumbTranslatorVisitor::thumb32_STMIA(bool W, Reg n, Imm<15> reg_list) {
|
bool ThumbTranslatorVisitor::thumb32_STMIA(bool W, Reg n, Imm<15> reg_list) {
|
||||||
const auto regs_imm = reg_list.ZeroExtend();
|
const auto regs_imm = reg_list.ZeroExtend();
|
||||||
const auto num_regs = static_cast<u32>(Common::BitCount(regs_imm));
|
const auto num_regs = static_cast<u32>(Common::BitCount(regs_imm));
|
||||||
|
|
|
@ -175,6 +175,7 @@ struct ThumbTranslatorVisitor final {
|
||||||
bool thumb32_LDMDB(bool W, Reg n, Imm<16> reg_list);
|
bool thumb32_LDMDB(bool W, Reg n, Imm<16> reg_list);
|
||||||
bool thumb32_LDMIA(bool W, Reg n, Imm<16> reg_list);
|
bool thumb32_LDMIA(bool W, Reg n, Imm<16> reg_list);
|
||||||
bool thumb32_POP(Imm<16> reg_list);
|
bool thumb32_POP(Imm<16> reg_list);
|
||||||
|
bool thumb32_PUSH(Imm<15> reg_list);
|
||||||
bool thumb32_STMIA(bool W, Reg n, Imm<15> reg_list);
|
bool thumb32_STMIA(bool W, Reg n, Imm<15> reg_list);
|
||||||
bool thumb32_STMDB(bool W, Reg n, Imm<15> reg_list);
|
bool thumb32_STMDB(bool W, Reg n, Imm<15> reg_list);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue