mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-02 12:44:34 +01:00
Implement Thumb PUSH instruction
This commit is contained in:
parent
9109b226af
commit
f7e3d7b8d2
10 changed files with 191 additions and 54 deletions
|
|
@ -280,6 +280,24 @@ public:
|
|||
return Common::StringFromFormat("uxtb %s, %s", RegStr(d), RegStr(m));
|
||||
}
|
||||
|
||||
std::string thumb16_PUSH(bool M, RegList reg_list) {
|
||||
if (M)
|
||||
reg_list |= 1 << 14;
|
||||
|
||||
std::string ret = "PUSH ";
|
||||
bool first_reg = true;
|
||||
for (size_t i = 0; i < 16; i++) {
|
||||
if (Common::Bit(i, reg_list)) {
|
||||
if (!first_reg)
|
||||
ret += ", ";
|
||||
ret += RegStr(static_cast<Reg>(i));
|
||||
first_reg = false;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::string thumb16_REV(Reg m, Reg d) {
|
||||
return Common::StringFromFormat("rev %s, %s", RegStr(d), RegStr(m));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue