summaryrefslogtreecommitdiffhomepage
path: root/Sources
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-04-28 09:13:24 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-04-28 09:13:24 +0200
commita63d034fdab18dd14ee34bc438f4c6cf72a839d7 (patch)
tree726d265ee0820b226443d8624e3d10a22ba93ede /Sources
parentf84498ff447cc4bf891999e782ef90bfbc9577bd (diff)
MHR-21: Fix ordering of cmp* instructions of PPCasm.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Sources')
-rw-r--r--Sources/ppcasm.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/Sources/ppcasm.cc b/Sources/ppcasm.cc
index 9d12922..3260662 100644
--- a/Sources/ppcasm.cc
+++ b/Sources/ppcasm.cc
@@ -909,15 +909,15 @@ bool CompilerKit::EncoderPowerPC::WriteLine(std::string &line,
}
if (opcodeName.find("cmp") != std::string::npos) {
- char rightReg = 0;
+ char rightReg = 0x0;
- for (size_t i = 0; i != found_registers_index[0]; i++) {
+ for (size_t i = 0; i != found_registers_index[1]; i++) {
rightReg += 0x08;
}
kBytes.emplace_back(0x00);
kBytes.emplace_back(rightReg);
- kBytes.emplace_back(found_registers_index[1]);
+ kBytes.emplace_back(found_registers_index[0]);
kBytes.emplace_back(0x7c);
}