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
This commit is contained in:
Jesse Talavera-Greenberg
2023-11-25 12:32:09 -05:00
committed by GitHub
parent 651b0f680c
commit 346dd4006e
178 changed files with 529 additions and 268 deletions

View File

@ -20,7 +20,7 @@
using namespace Arm64Gen;
namespace ARMJIT
namespace melonDS
{
void Compiler::Comp_RegShiftReg(int op, bool S, Op2& op2, ARM64Reg rs)
@ -480,7 +480,7 @@ void Compiler::A_Comp_GetOp2(bool S, Op2& op2)
Comp_AddCycles_C();
u32 shift = (CurInstr.Instr >> 7) & 0x1E;
u32 imm = ::ROR(CurInstr.Instr & 0xFF, shift);
u32 imm = melonDS::ROR(CurInstr.Instr & 0xFF, shift);
if (S && shift && (CurInstr.SetFlags & 0x2))
{

View File

@ -23,7 +23,7 @@ using namespace Arm64Gen;
// hack
const int kCodeCacheTiming = 3;
namespace ARMJIT
namespace melonDS
{
template <typename T>

View File

@ -39,7 +39,7 @@ using namespace Arm64Gen;
extern "C" void ARM_Ret();
namespace ARMJIT
namespace melonDS
{
/*
@ -106,7 +106,7 @@ void Compiler::A_Comp_MSR()
if (CurInstr.Instr & (1 << 25))
{
val = W0;
MOVI2R(val, ::ROR((CurInstr.Instr & 0xFF), ((CurInstr.Instr >> 7) & 0x1E)));
MOVI2R(val, melonDS::ROR((CurInstr.Instr & 0xFF), ((CurInstr.Instr >> 7) & 0x1E)));
}
else
{

View File

@ -28,7 +28,7 @@
#include <unordered_map>
namespace ARMJIT
namespace melonDS
{
class ARMJIT;
const Arm64Gen::ARM64Reg RMemBase = Arm64Gen::X26;

View File

@ -24,7 +24,7 @@
using namespace Arm64Gen;
namespace ARMJIT
namespace melonDS
{
bool Compiler::IsJITFault(u8* pc)
@ -79,7 +79,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)
{