From a63d034fdab18dd14ee34bc438f4c6cf72a839d7 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sun, 28 Apr 2024 09:13:24 +0200 Subject: MHR-21: Fix ordering of cmp* instructions of PPCasm. Signed-off-by: Amlal El Mahrouss --- Sources/ppcasm.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Sources') 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); } -- cgit v1.2.3