From cea889bde5b61e62df351bf74262aae4b17b0508 Mon Sep 17 00:00:00 2001 From: joevt Date: Sat, 7 Dec 2024 04:24:47 -0800 Subject: [PATCH] ppcopcodes: Cleanup lzu lzux lhau lhaux. --- cpu/ppc/ppcopcodes.cpp | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/cpu/ppc/ppcopcodes.cpp b/cpu/ppc/ppcopcodes.cpp index e4512af..6602f5a 100644 --- a/cpu/ppc/ppcopcodes.cpp +++ b/cpu/ppc/ppcopcodes.cpp @@ -1659,10 +1659,8 @@ void dppc_interpreter::ppc_lzu(uint32_t opcode) { ea += ppc_result_a; uint32_t ppc_result_d = mmu_read_vmem(opcode, ea); ppc_store_iresult_reg(reg_d, ppc_result_d); - if (!(is_601 && (reg_a == 0))) { - uint32_t ppc_result_a = ea; - ppc_store_iresult_reg(reg_a, ppc_result_a); - } + uint32_t ppc_result_a = ea; + ppc_store_iresult_reg(reg_a, ppc_result_a); } else { ppc_exception_handler(Except_Type::EXC_PROGRAM, Exc_Cause::ILLEGAL_OP); } @@ -1697,10 +1695,8 @@ void dppc_interpreter::ppc_lzux(uint32_t opcode) { uint32_t ea = ppc_result_a + ppc_result_b; uint32_t ppc_result_d = mmu_read_vmem(opcode, ea); ppc_store_iresult_reg(reg_d, ppc_result_d); - if (!(is_601 && (reg_a == 0))) { - uint32_t ppc_result_a = ea; - ppc_store_iresult_reg(reg_a, ppc_result_a); - } + ppc_result_a = ea; + ppc_store_iresult_reg(reg_a, ppc_result_a); } else { ppc_exception_handler(Except_Type::EXC_PROGRAM, Exc_Cause::ILLEGAL_OP); } @@ -1733,10 +1729,6 @@ void dppc_interpreter::ppc_lhau(uint32_t opcode) { ppc_store_iresult_reg(reg_d, int32_t(val)); uint32_t ppc_result_a = ea; ppc_store_iresult_reg(reg_a, ppc_result_a); - if (!(is_601 && (reg_a == 0))) { - uint32_t ppc_result_a = ea; - ppc_store_iresult_reg(reg_a, ppc_result_a); - } } else { ppc_exception_handler(Except_Type::EXC_PROGRAM, Exc_Cause::ILLEGAL_OP); } @@ -1753,10 +1745,6 @@ void dppc_interpreter::ppc_lhaux(uint32_t opcode) { ppc_store_iresult_reg(reg_d, int32_t(val)); uint32_t ppc_result_a = ea; ppc_store_iresult_reg(reg_a, ppc_result_a); - if (!(is_601 && (reg_a == 0))) { - uint32_t ppc_result_a = ea; - ppc_store_iresult_reg(reg_a, ppc_result_a); - } } else { ppc_exception_handler(Except_Type::EXC_PROGRAM, Exc_Cause::ILLEGAL_OP);