diff options
author | Jesse Talavera-Greenberg <jesse@jesse.tg> | 2023-11-25 12:32:09 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-25 18:32:09 +0100 |
commit | 346dd4006ea1283136095d5c43f602324a095092 (patch) | |
tree | edf04631782bbfcdb48eac79b79aebb11b40f479 /src/ARMJIT_x64 | |
parent | 651b0f680c4531558990a5beb0e638968009dc51 (diff) |
Move all core types into namespaces (#1886)
* Reorganize namespaces
- Most types are now moved into the `melonDS` namespace
- Only good chance to do this for a while, since a big refactor is next
* Fix the build
Diffstat (limited to 'src/ARMJIT_x64')
-rw-r--r-- | src/ARMJIT_x64/ARMJIT_ALU.cpp | 4 | ||||
-rw-r--r-- | src/ARMJIT_x64/ARMJIT_Branch.cpp | 2 | ||||
-rw-r--r-- | src/ARMJIT_x64/ARMJIT_Compiler.cpp | 5 | ||||
-rw-r--r-- | src/ARMJIT_x64/ARMJIT_Compiler.h | 6 | ||||
-rw-r--r-- | src/ARMJIT_x64/ARMJIT_GenOffsets.cpp | 2 | ||||
-rw-r--r-- | src/ARMJIT_x64/ARMJIT_LoadStore.cpp | 4 |
6 files changed, 12 insertions, 11 deletions
diff --git a/src/ARMJIT_x64/ARMJIT_ALU.cpp b/src/ARMJIT_x64/ARMJIT_ALU.cpp index bdc17e8..69449ff 100644 --- a/src/ARMJIT_x64/ARMJIT_ALU.cpp +++ b/src/ARMJIT_x64/ARMJIT_ALU.cpp @@ -21,7 +21,7 @@ using namespace Gen; -namespace ARMJIT +namespace melonDS { // uses RSCRATCH3 @@ -129,7 +129,7 @@ OpArg Compiler::A_Comp_GetALUOp2(bool S, bool& carryUsed) Comp_AddCycles_C(); u32 shift = (CurInstr.Instr >> 7) & 0x1E; - u32 imm = ::ROR(CurInstr.Instr & 0xFF, shift); + u32 imm = melonDS::ROR(CurInstr.Instr & 0xFF, shift); carryUsed = false; if (S && shift) diff --git a/src/ARMJIT_x64/ARMJIT_Branch.cpp b/src/ARMJIT_x64/ARMJIT_Branch.cpp index ae7d1ae..5d76447 100644 --- a/src/ARMJIT_x64/ARMJIT_Branch.cpp +++ b/src/ARMJIT_x64/ARMJIT_Branch.cpp @@ -21,7 +21,7 @@ using namespace Gen; -namespace ARMJIT +namespace melonDS { template <typename T> diff --git a/src/ARMJIT_x64/ARMJIT_Compiler.cpp b/src/ARMJIT_x64/ARMJIT_Compiler.cpp index 5506db7..9fc7237 100644 --- a/src/ARMJIT_x64/ARMJIT_Compiler.cpp +++ b/src/ARMJIT_x64/ARMJIT_Compiler.cpp @@ -34,10 +34,11 @@ #endif using namespace Gen; +using namespace Common; extern "C" void ARM_Ret(); -namespace ARMJIT +namespace melonDS { template <> const X64Reg RegisterCache<Compiler, X64Reg>::NativeRegAllocOrder[] = @@ -141,7 +142,7 @@ void Compiler::A_Comp_MSR() Comp_AddCycles_C(); OpArg val = CurInstr.Instr & (1 << 25) - ? Imm32(::ROR((CurInstr.Instr & 0xFF), ((CurInstr.Instr >> 7) & 0x1E))) + ? Imm32(melonDS::ROR((CurInstr.Instr & 0xFF), ((CurInstr.Instr >> 7) & 0x1E))) : MapReg(CurInstr.A_Reg(0)); u32 mask = 0; diff --git a/src/ARMJIT_x64/ARMJIT_Compiler.h b/src/ARMJIT_x64/ARMJIT_Compiler.h index 84efb35..f38a6c3 100644 --- a/src/ARMJIT_x64/ARMJIT_Compiler.h +++ b/src/ARMJIT_x64/ARMJIT_Compiler.h @@ -30,11 +30,11 @@ #include <unordered_map> -class ARMJIT_Memory; -namespace ARMJIT +namespace melonDS { class ARMJIT; +class ARMJIT_Memory; const Gen::X64Reg RCPU = Gen::RBP; const Gen::X64Reg RCPSR = Gen::R15; @@ -172,7 +172,7 @@ public: memop_SubtractOffset = 1 << 4 }; void Comp_MemAccess(int rd, int rn, const Op2& op2, int size, int flags); - s32 Comp_MemAccessBlock(int rn, BitSet16 regs, bool store, bool preinc, bool decrement, bool usermode, bool skipLoadingRn); + s32 Comp_MemAccessBlock(int rn, Common::BitSet16 regs, bool store, bool preinc, bool decrement, bool usermode, bool skipLoadingRn); bool Comp_MemLoadLiteral(int size, bool signExtend, int rd, u32 addr); void Comp_ArithTriOp(void (Compiler::*op)(int, const Gen::OpArg&, const Gen::OpArg&), diff --git a/src/ARMJIT_x64/ARMJIT_GenOffsets.cpp b/src/ARMJIT_x64/ARMJIT_GenOffsets.cpp index 0961fdd..e2a74ee 100644 --- a/src/ARMJIT_x64/ARMJIT_GenOffsets.cpp +++ b/src/ARMJIT_x64/ARMJIT_GenOffsets.cpp @@ -17,7 +17,7 @@ */ #include "../ARM.h" - +using namespace melonDS; int main(int argc, char* argv[]) { FILE* f = fopen("ARMJIT_Offsets.h", "w"); diff --git a/src/ARMJIT_x64/ARMJIT_LoadStore.cpp b/src/ARMJIT_x64/ARMJIT_LoadStore.cpp index 1433429..9b7d865 100644 --- a/src/ARMJIT_x64/ARMJIT_LoadStore.cpp +++ b/src/ARMJIT_x64/ARMJIT_LoadStore.cpp @@ -21,7 +21,7 @@ using namespace Gen; -namespace ARMJIT +namespace melonDS { template <typename T> @@ -85,7 +85,7 @@ bool Compiler::Comp_MemLoadLiteral(int size, bool signExtend, int rd, u32 addr) if (size == 32) { CurCPU->DataRead32(addr & ~0x3, &val); - val = ::ROR(val, (addr & 0x3) << 3); + val = melonDS::ROR(val, (addr & 0x3) << 3); } else if (size == 16) { |