From edfbb6ab9a0f24b5890b738af801579088727cea Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Fri, 19 Dec 2014 20:52:57 -0600 Subject: [PATCH] [ARM] Adds a ArmCommon folder. Moves the backpatch flags and struct to a common location for ARM. I'm sure there will be more things that use this common ARM location in the future. --- Source/Core/Core/PowerPC/JitArm32/Jit.h | 21 ++------------- .../Core/PowerPC/JitArmCommon/BackPatch.h | 26 +++++++++++++++++++ 2 files changed, 28 insertions(+), 19 deletions(-) create mode 100644 Source/Core/Core/PowerPC/JitArmCommon/BackPatch.h diff --git a/Source/Core/Core/PowerPC/JitArm32/Jit.h b/Source/Core/Core/PowerPC/JitArm32/Jit.h index 98f6884e1c..2d961a20f9 100644 --- a/Source/Core/Core/PowerPC/JitArm32/Jit.h +++ b/Source/Core/Core/PowerPC/JitArm32/Jit.h @@ -24,6 +24,7 @@ #include "Core/PowerPC/JitArm32/JitAsm.h" #include "Core/PowerPC/JitArm32/JitFPRCache.h" #include "Core/PowerPC/JitArm32/JitRegCache.h" +#include "Core/PowerPC/JitArmCommon/BackPatch.h" #include "Core/PowerPC/JitCommon/JitBase.h" #define PPCSTATE_OFF(elem) ((s32)STRUCT_OFF(PowerPC::ppcState, elem) - (s32)STRUCT_OFF(PowerPC::ppcState, spr[0])) @@ -48,26 +49,8 @@ private: ArmFPRCache fpr; PPCAnalyst::CodeBuffer code_buffer; - struct BackPatchInfo - { - enum - { - FLAG_STORE = (1 << 0), - FLAG_LOAD = (1 << 1), - FLAG_SIZE_8 = (1 << 2), - FLAG_SIZE_16 = (1 << 3), - FLAG_SIZE_32 = (1 << 4), - FLAG_SIZE_F32 = (1 << 5), - FLAG_SIZE_F64 = (1 << 6), - FLAG_REVERSE = (1 << 7), - FLAG_EXTEND = (1 << 8), - }; - u32 m_fastmem_size; - u32 m_fastmem_trouble_inst_offset; - u32 m_slowmem_size; - }; - // The key is the flags + // The key is the backpatch flags std::map m_backpatch_info; void DoDownCount(); diff --git a/Source/Core/Core/PowerPC/JitArmCommon/BackPatch.h b/Source/Core/Core/PowerPC/JitArmCommon/BackPatch.h new file mode 100644 index 0000000000..4ba3c4a703 --- /dev/null +++ b/Source/Core/Core/PowerPC/JitArmCommon/BackPatch.h @@ -0,0 +1,26 @@ +// Copyright 2014 Dolphin Emulator Project +// Licensed under GPLv2 +// Refer to the license.txt file included. + +#pragma once +#include "Common/CommonTypes.h" + +struct BackPatchInfo +{ + enum + { + FLAG_STORE = (1 << 0), + FLAG_LOAD = (1 << 1), + FLAG_SIZE_8 = (1 << 2), + FLAG_SIZE_16 = (1 << 3), + FLAG_SIZE_32 = (1 << 4), + FLAG_SIZE_F32 = (1 << 5), + FLAG_SIZE_F64 = (1 << 6), + FLAG_REVERSE = (1 << 7), + FLAG_EXTEND = (1 << 8), + }; + + u32 m_fastmem_size; + u32 m_fastmem_trouble_inst_offset; + u32 m_slowmem_size; +};