From 86d7fbd4b8fcd2d4a9c25c6dc52d204fedd28dab Mon Sep 17 00:00:00 2001 From: zilmar Date: Tue, 22 Nov 2016 17:54:46 +1100 Subject: [PATCH] [Project64] Add comment to LoadArmRegPointerToArmReg --- Source/Project64-core/N64System/Recompiler/Arm/ArmOps.cpp | 6 +++--- Source/Project64-core/N64System/Recompiler/Arm/ArmOps.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.cpp b/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.cpp index 35486a22a..949748f9f 100644 --- a/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.cpp +++ b/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.cpp @@ -480,7 +480,7 @@ void CArmOps::LoadArmRegPointerByteToArmReg(ArmReg DestReg, ArmReg RegPointer, A } } -void CArmOps::LoadArmRegPointerToArmReg(ArmReg DestReg, ArmReg RegPointer, uint8_t Offset) +void CArmOps::LoadArmRegPointerToArmReg(ArmReg DestReg, ArmReg RegPointer, uint8_t Offset, const char * comment) { if (mInItBlock) { g_Notify->BreakPoint(__FILE__,__LINE__); } @@ -492,7 +492,7 @@ void CArmOps::LoadArmRegPointerToArmReg(ArmReg DestReg, ArmReg RegPointer, uint8 g_Notify->BreakPoint(__FILE__,__LINE__); return; } - CPU_Message(" ldr.w\t%s, [%s, #%d]", ArmRegName(DestReg), ArmRegName(RegPointer), (uint32_t)Offset); + CPU_Message(" ldr.w\t%s, [%s, #%d]%s%s", ArmRegName(DestReg), ArmRegName(RegPointer), (uint32_t)Offset, comment != NULL ? "\t; " : "", comment != NULL ? comment : ""); Arm32Opcode op = {0}; op.imm12.rt = DestReg; op.imm12.rn = RegPointer; @@ -502,7 +502,7 @@ void CArmOps::LoadArmRegPointerToArmReg(ArmReg DestReg, ArmReg RegPointer, uint8 } else { - CPU_Message(" ldr\t%s, [%s, #%d]", ArmRegName(DestReg), ArmRegName(RegPointer), (uint32_t)Offset); + CPU_Message(" ldr\t%s, [%s, #%d]%s%s", ArmRegName(DestReg), ArmRegName(RegPointer), (uint32_t)Offset, comment != NULL ? "\t; " : "", comment != NULL ? comment : ""); ArmThumbOpcode op = {0}; op.Imm5.rt = DestReg; op.Imm5.rn = RegPointer; diff --git a/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.h b/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.h index 72bd39d8a..7e563e4ca 100644 --- a/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.h +++ b/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.h @@ -170,7 +170,7 @@ protected: static void IfBlock(ArmItMask mask, ArmCompareType CompareType); static void LoadArmRegPointerByteToArmReg(ArmReg DestReg, ArmReg RegPointer, uint16_t offset); static void LoadArmRegPointerByteToArmReg(ArmReg DestReg, ArmReg RegPointer, ArmReg RegPointer2, uint8_t shift); - static void LoadArmRegPointerToArmReg(ArmReg DestReg, ArmReg RegPointer, uint8_t Offset); + static void LoadArmRegPointerToArmReg(ArmReg DestReg, ArmReg RegPointer, uint8_t Offset, const char * comment = NULL); static void LoadArmRegPointerToArmReg(ArmReg DestReg, ArmReg RegPointer, ArmReg RegPointer2, uint8_t shift); static void LoadArmRegPointerToFloatReg(ArmReg RegPointer, ArmFpuSingle Reg, uint8_t Offset); static void LoadFloatingPointControlReg(ArmReg DestReg);