From bd4cfaaed7b241a8285a825c735cce21c5724f27 Mon Sep 17 00:00:00 2001 From: MerryMage Date: Sat, 22 Apr 2017 10:15:04 +0100 Subject: [PATCH] Jit_Integer: Use constant pool in GenerateOverflow --- Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp index 4fdf8fab1a..3ec29b8d6d 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp @@ -2,6 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. +#include #include #include @@ -50,9 +51,9 @@ void Jit64::GenerateOverflow() // We need to do this without modifying flags so as not to break stuff that assumes flags // aren't clobbered (carry, branch merging): speed doesn't really matter here (this is really // rare). - static const u8 ovtable[4] = {0, 0, XER_SO_MASK, XER_SO_MASK}; + static const std::array ovtable = {0, 0, XER_SO_MASK, XER_SO_MASK}; MOVZX(32, 8, RSCRATCH, PPCSTATE(xer_so_ov)); - MOV(64, R(RSCRATCH2), ImmPtr(ovtable)); + LEA(64, RSCRATCH2, MConst(ovtable)); MOV(8, R(RSCRATCH), MRegSum(RSCRATCH, RSCRATCH2)); MOV(8, PPCSTATE(xer_so_ov), R(RSCRATCH)); SetJumpTarget(exit);