mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-01 20:24:36 +01:00
Implement Thumb Instructions: STRH (imm), LDRH (imm)
This commit is contained in:
parent
f9755870bb
commit
a605a43ef9
3 changed files with 30 additions and 2 deletions
|
|
@ -264,6 +264,16 @@ public:
|
|||
return Common::StringFromFormat("ldr %s, [%s, #%u]", RegStr(t), RegStr(n), imm32);
|
||||
}
|
||||
|
||||
std::string thumb16_STRH_imm(Imm5 imm5, Reg n, Reg t) {
|
||||
u32 imm32 = imm5 << 1;
|
||||
return Common::StringFromFormat("strh %s, [%s, #%u]", RegStr(t), RegStr(n), imm32);
|
||||
}
|
||||
|
||||
std::string thumb16_LDRH_imm(Imm5 imm5, Reg n, Reg t) {
|
||||
u32 imm32 = imm5 << 1;
|
||||
return Common::StringFromFormat("ldrh %s, [%s, #%u]", RegStr(t), RegStr(n), imm32);
|
||||
}
|
||||
|
||||
std::string thumb16_ADR(Reg d, Imm8 imm8) {
|
||||
u32 imm32 = imm8 << 2;
|
||||
return Common::StringFromFormat("adr %s, +#%u", RegStr(d), imm32);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue