From 77756b44d578c9c8c9c592a7f06b60fb278e9738 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 7 Jan 2017 21:53:06 -0500 Subject: [PATCH 1/2] Jit64Base: Const correctness for LogGeneratedX86 --- Source/Core/Core/PowerPC/Jit64Common/Jit64Base.cpp | 4 ++-- Source/Core/Core/PowerPC/Jit64Common/Jit64Base.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Core/Core/PowerPC/Jit64Common/Jit64Base.cpp b/Source/Core/Core/PowerPC/Jit64Common/Jit64Base.cpp index 0ecba1c8bf..a0cf01ecd3 100644 --- a/Source/Core/Core/PowerPC/Jit64Common/Jit64Base.cpp +++ b/Source/Core/Core/PowerPC/Jit64Common/Jit64Base.cpp @@ -126,8 +126,8 @@ bool Jitx86Base::BackPatch(u32 emAddress, SContext* ctx) return true; } -void LogGeneratedX86(int size, PPCAnalyst::CodeBuffer* code_buffer, const u8* normalEntry, - JitBlock* b) +void LogGeneratedX86(int size, const PPCAnalyst::CodeBuffer* code_buffer, const u8* normalEntry, + const JitBlock* b) { for (int i = 0; i < size; i++) { diff --git a/Source/Core/Core/PowerPC/Jit64Common/Jit64Base.h b/Source/Core/Core/PowerPC/Jit64Common/Jit64Base.h index e05c8f84ee..f474d9fbda 100644 --- a/Source/Core/Core/PowerPC/Jit64Common/Jit64Base.h +++ b/Source/Core/Core/PowerPC/Jit64Common/Jit64Base.h @@ -47,5 +47,5 @@ public: bool HandleFault(uintptr_t access_address, SContext* ctx) override; }; -void LogGeneratedX86(int size, PPCAnalyst::CodeBuffer* code_buffer, const u8* normalEntry, - JitBlock* b); +void LogGeneratedX86(int size, const PPCAnalyst::CodeBuffer* code_buffer, const u8* normalEntry, + const JitBlock* b); From 27350dbf1c2055ab572bd0ef83c8476c454eaba3 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 7 Jan 2017 21:57:19 -0500 Subject: [PATCH 2/2] Jit64Base: Use size_t to represent size in LogGeneratedX86 --- Source/Core/Core/PowerPC/Jit64Common/Jit64Base.cpp | 4 ++-- Source/Core/Core/PowerPC/Jit64Common/Jit64Base.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Core/Core/PowerPC/Jit64Common/Jit64Base.cpp b/Source/Core/Core/PowerPC/Jit64Common/Jit64Base.cpp index a0cf01ecd3..3aebf23e58 100644 --- a/Source/Core/Core/PowerPC/Jit64Common/Jit64Base.cpp +++ b/Source/Core/Core/PowerPC/Jit64Common/Jit64Base.cpp @@ -126,10 +126,10 @@ bool Jitx86Base::BackPatch(u32 emAddress, SContext* ctx) return true; } -void LogGeneratedX86(int size, const PPCAnalyst::CodeBuffer* code_buffer, const u8* normalEntry, +void LogGeneratedX86(size_t size, const PPCAnalyst::CodeBuffer* code_buffer, const u8* normalEntry, const JitBlock* b) { - for (int i = 0; i < size; i++) + for (size_t i = 0; i < size; i++) { const PPCAnalyst::CodeOp& op = code_buffer->codebuffer[i]; std::string temp = StringFromFormat( diff --git a/Source/Core/Core/PowerPC/Jit64Common/Jit64Base.h b/Source/Core/Core/PowerPC/Jit64Common/Jit64Base.h index f474d9fbda..9638cd60ab 100644 --- a/Source/Core/Core/PowerPC/Jit64Common/Jit64Base.h +++ b/Source/Core/Core/PowerPC/Jit64Common/Jit64Base.h @@ -47,5 +47,5 @@ public: bool HandleFault(uintptr_t access_address, SContext* ctx) override; }; -void LogGeneratedX86(int size, const PPCAnalyst::CodeBuffer* code_buffer, const u8* normalEntry, +void LogGeneratedX86(size_t size, const PPCAnalyst::CodeBuffer* code_buffer, const u8* normalEntry, const JitBlock* b);