From c67d095787b0b36a89ab96b5e5eee8519715bea7 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 3 Feb 2017 11:42:40 -0500 Subject: [PATCH] PowerPC: Move page #define constants to MMU.cpp These are only ever used here. This also converts them into typed constants. --- Source/Core/Core/PowerPC/MMU.cpp | 6 +++++- Source/Core/Core/PowerPC/PowerPC.h | 5 ----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Source/Core/Core/PowerPC/MMU.cpp b/Source/Core/Core/PowerPC/MMU.cpp index d1ac07713c..9679460357 100644 --- a/Source/Core/Core/PowerPC/MMU.cpp +++ b/Source/Core/Core/PowerPC/MMU.cpp @@ -2,6 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. +#include #include #include "Common/Atomic.h" @@ -25,7 +26,10 @@ namespace PowerPC { -#define HW_PAGE_SIZE 4096 +constexpr size_t HW_PAGE_SIZE = 4096; +constexpr u32 HW_PAGE_INDEX_SHIFT = 12; +constexpr u32 HW_PAGE_INDEX_MASK = 0x3f; +constexpr u32 HW_PAGE_TAG_SHIFT = 18; // EFB RE /* diff --git a/Source/Core/Core/PowerPC/PowerPC.h b/Source/Core/Core/PowerPC/PowerPC.h index f507616491..760bf45577 100644 --- a/Source/Core/Core/PowerPC/PowerPC.h +++ b/Source/Core/Core/PowerPC/PowerPC.h @@ -40,11 +40,6 @@ enum CoreMode #define TLB_SIZE 128 #define NUM_TLBS 2 #define TLB_WAYS 2 - -#define HW_PAGE_INDEX_SHIFT 12 -#define HW_PAGE_INDEX_MASK 0x3f -#define HW_PAGE_TAG_SHIFT 18 - #define TLB_TAG_INVALID 0xffffffff struct tlb_entry