diff --git a/src/xenia/cpu/backend/x64/x64_emitter.cc b/src/xenia/cpu/backend/x64/x64_emitter.cc index 4ed300f71..78fb51c7d 100644 --- a/src/xenia/cpu/backend/x64/x64_emitter.cc +++ b/src/xenia/cpu/backend/x64/x64_emitter.cc @@ -277,7 +277,7 @@ void X64Emitter::MarkSourceOffset(const Instr* i) { void X64Emitter::EmitGetCurrentThreadId() { // rcx must point to context. We could fetch from the stack if needed. - mov(ax, word[rcx + offsetof(frontend::PPCContext, thread_id)]); + mov(ax, word[rcx + offsetof(ppc::PPCContext, thread_id)]); } void X64Emitter::EmitTraceUserCallReturn() {} @@ -482,7 +482,7 @@ void X64Emitter::CallExtern(const hir::Instr* instr, const Function* function) { // rcx = context // rdx = target host function mov(rdx, reinterpret_cast(extern_function->extern_handler())); - mov(r8, qword[rcx + offsetof(cpu::frontend::PPCContext, kernel_state)]); + mov(r8, qword[rcx + offsetof(ppc::PPCContext, kernel_state)]); auto thunk = backend()->guest_to_host_thunk(); mov(rax, reinterpret_cast(thunk)); call(rax); diff --git a/src/xenia/cpu/compiler/passes/context_promotion_pass.cc b/src/xenia/cpu/compiler/passes/context_promotion_pass.cc index e95620971..acf3dc584 100644 --- a/src/xenia/cpu/compiler/passes/context_promotion_pass.cc +++ b/src/xenia/cpu/compiler/passes/context_promotion_pass.cc @@ -13,7 +13,7 @@ #include "xenia/base/profiling.h" #include "xenia/cpu/compiler/compiler.h" -#include "xenia/cpu/frontend/ppc_context.h" +#include "xenia/cpu/ppc/ppc_context.h" #include "xenia/cpu/processor.h" DECLARE_bool(debug); @@ -44,8 +44,8 @@ bool ContextPromotionPass::Initialize(Compiler* compiler) { } // This is a terrible implementation. - context_values_.resize(sizeof(frontend::PPCContext)); - context_validity_.resize(static_cast(sizeof(frontend::PPCContext))); + context_values_.resize(sizeof(ppc::PPCContext)); + context_validity_.resize(static_cast(sizeof(ppc::PPCContext))); return true; } diff --git a/src/xenia/cpu/export_resolver.h b/src/xenia/cpu/export_resolver.h index fd9d612a1..feb4f560b 100644 --- a/src/xenia/cpu/export_resolver.h +++ b/src/xenia/cpu/export_resolver.h @@ -14,7 +14,7 @@ #include #include "xenia/base/math.h" -#include "xenia/cpu/frontend/ppc_context.h" +#include "xenia/cpu/ppc/ppc_context.h" namespace xe { namespace cpu { @@ -52,7 +52,7 @@ struct ExportTag { // DEPRECATED typedef void (*xe_kernel_export_shim_fn)(void*, void*); -typedef void (*ExportTrampoline)(xe::cpu::frontend::PPCContext* ppc_context); +typedef void (*ExportTrampoline)(ppc::PPCContext* ppc_context); class Export { public: diff --git a/src/xenia/cpu/function.h b/src/xenia/cpu/function.h index 19963e25d..29160c4da 100644 --- a/src/xenia/cpu/function.h +++ b/src/xenia/cpu/function.h @@ -14,7 +14,7 @@ #include #include "xenia/cpu/debug_info.h" -#include "xenia/cpu/frontend/ppc_context.h" +#include "xenia/cpu/ppc/ppc_context.h" #include "xenia/cpu/symbol.h" #include "xenia/cpu/thread_state.h" #include "xenia/debug/function_trace_data.h" @@ -60,8 +60,7 @@ class Function : public Symbol { class BuiltinFunction : public Function { public: - typedef void (*Handler)(frontend::PPCContext* ppc_context, void* arg0, - void* arg1); + typedef void (*Handler)(ppc::PPCContext* ppc_context, void* arg0, void* arg1); BuiltinFunction(Module* module, uint32_t address); ~BuiltinFunction() override; @@ -82,7 +81,7 @@ class BuiltinFunction : public Function { class GuestFunction : public Function { public: - typedef void (*ExternHandler)(frontend::PPCContext* ppc_context, + typedef void (*ExternHandler)(ppc::PPCContext* ppc_context, kernel::KernelState* kernel_state); GuestFunction(Module* module, uint32_t address); diff --git a/src/xenia/cpu/frontend/ppc_context.cc b/src/xenia/cpu/ppc/ppc_context.cc similarity index 98% rename from src/xenia/cpu/frontend/ppc_context.cc rename to src/xenia/cpu/ppc/ppc_context.cc index d826c4b9f..ffdc484c3 100644 --- a/src/xenia/cpu/frontend/ppc_context.cc +++ b/src/xenia/cpu/ppc/ppc_context.cc @@ -7,7 +7,7 @@ ****************************************************************************** */ -#include "xenia/cpu/frontend/ppc_context.h" +#include "xenia/cpu/ppc/ppc_context.h" #include #include @@ -17,7 +17,7 @@ namespace xe { namespace cpu { -namespace frontend { +namespace ppc { std::string PPCContext::GetRegisterName(PPCRegister reg) { switch (reg) { @@ -150,6 +150,6 @@ bool PPCContext::CompareRegWithString(const char* name, const char* value, } } -} // namespace frontend +} // namespace ppc } // namespace cpu } // namespace xe diff --git a/src/xenia/cpu/frontend/ppc_context.h b/src/xenia/cpu/ppc/ppc_context.h similarity index 98% rename from src/xenia/cpu/frontend/ppc_context.h rename to src/xenia/cpu/ppc/ppc_context.h index 59d8c7a86..7146972bc 100644 --- a/src/xenia/cpu/frontend/ppc_context.h +++ b/src/xenia/cpu/ppc/ppc_context.h @@ -7,8 +7,8 @@ ****************************************************************************** */ -#ifndef XENIA_CPU_FRONTEND_PPC_CONTEXT_H_ -#define XENIA_CPU_FRONTEND_PPC_CONTEXT_H_ +#ifndef XENIA_CPU_PPC_PPC_CONTEXT_H_ +#define XENIA_CPU_PPC_PPC_CONTEXT_H_ #include #include @@ -28,7 +28,7 @@ class KernelState; namespace xe { namespace cpu { -namespace frontend { +namespace ppc { // Map: // 0-31: GPR @@ -435,8 +435,8 @@ typedef struct PPCContext_s { #pragma pack(pop) static_assert(sizeof(PPCContext) % 64 == 0, "64b padded"); -} // namespace frontend +} // namespace ppc } // namespace cpu } // namespace xe -#endif // XENIA_CPU_FRONTEND_PPC_CONTEXT_H_ +#endif // XENIA_CPU_PPC_PPC_CONTEXT_H_ diff --git a/src/xenia/cpu/frontend/ppc_disasm.cc b/src/xenia/cpu/ppc/ppc_disasm.cc similarity index 99% rename from src/xenia/cpu/frontend/ppc_disasm.cc rename to src/xenia/cpu/ppc/ppc_disasm.cc index 0de8073ac..a815f43d3 100644 --- a/src/xenia/cpu/frontend/ppc_disasm.cc +++ b/src/xenia/cpu/ppc/ppc_disasm.cc @@ -7,7 +7,7 @@ ****************************************************************************** */ -#include "xenia/cpu/frontend/ppc_disasm.h" +#include "xenia/cpu/ppc/ppc_disasm.h" #include "xenia/base/assert.h" #include "xenia/base/math.h" @@ -15,7 +15,7 @@ namespace xe { namespace cpu { -namespace frontend { +namespace ppc { void Disasm_0(InstrData* i, StringBuffer* str) { str->AppendFormat("%-8s ???", i->type->name); @@ -514,6 +514,6 @@ int DisasmPPC(InstrData* i, StringBuffer* str) { return 0; } -} // namespace frontend +} // namespace ppc } // namespace cpu } // namespace xe diff --git a/src/xenia/cpu/frontend/ppc_disasm.h b/src/xenia/cpu/ppc/ppc_disasm.h similarity index 75% rename from src/xenia/cpu/frontend/ppc_disasm.h rename to src/xenia/cpu/ppc/ppc_disasm.h index 147084c5d..faf372b47 100644 --- a/src/xenia/cpu/frontend/ppc_disasm.h +++ b/src/xenia/cpu/ppc/ppc_disasm.h @@ -7,20 +7,20 @@ ****************************************************************************** */ -#ifndef XENIA_CPU_FRONTEND_PPC_DISASM_H_ -#define XENIA_CPU_FRONTEND_PPC_DISASM_H_ +#ifndef XENIA_CPU_PPC_PPC_DISASM_H_ +#define XENIA_CPU_PPC_PPC_DISASM_H_ #include "xenia/base/string_buffer.h" -#include "xenia/cpu/frontend/ppc_instr.h" +#include "xenia/cpu/ppc/ppc_instr.h" namespace xe { namespace cpu { -namespace frontend { +namespace ppc { int DisasmPPC(InstrData* i, StringBuffer* str); -} // namespace frontend +} // namespace ppc } // namespace cpu } // namespace xe -#endif // XENIA_CPU_FRONTEND_PPC_DISASM_H_ +#endif // XENIA_CPU_PPC_PPC_DISASM_H_ diff --git a/src/xenia/cpu/frontend/ppc_emit-private.h b/src/xenia/cpu/ppc/ppc_emit-private.h similarity index 77% rename from src/xenia/cpu/frontend/ppc_emit-private.h rename to src/xenia/cpu/ppc/ppc_emit-private.h index ac5923a85..65845c47d 100644 --- a/src/xenia/cpu/frontend/ppc_emit-private.h +++ b/src/xenia/cpu/ppc/ppc_emit-private.h @@ -7,16 +7,16 @@ ****************************************************************************** */ -#ifndef XENIA_CPU_FRONTEND_PPC_EMIT_PRIVATE_H_ -#define XENIA_CPU_FRONTEND_PPC_EMIT_PRIVATE_H_ +#ifndef XENIA_CPU_PPC_PPC_EMIT_PRIVATE_H_ +#define XENIA_CPU_PPC_PPC_EMIT_PRIVATE_H_ #include "xenia/base/logging.h" -#include "xenia/cpu/frontend/ppc_emit.h" -#include "xenia/cpu/frontend/ppc_instr.h" +#include "xenia/cpu/ppc/ppc_emit.h" +#include "xenia/cpu/ppc/ppc_instr.h" namespace xe { namespace cpu { -namespace frontend { +namespace ppc { #define XEEMITTER(name, opcode, format) int InstrEmit_##name @@ -27,8 +27,8 @@ namespace frontend { XELOGE("Unimplemented instruction: %s", __FUNCTION__); \ assert_always("Instruction not implemented"); -} // namespace frontend +} // namespace ppc } // namespace cpu } // namespace xe -#endif // XENIA_CPU_FRONTEND_PPC_EMIT_PRIVATE_H_ +#endif // XENIA_CPU_PPC_PPC_EMIT_PRIVATE_H_ diff --git a/src/xenia/cpu/frontend/ppc_emit.h b/src/xenia/cpu/ppc/ppc_emit.h similarity index 77% rename from src/xenia/cpu/frontend/ppc_emit.h rename to src/xenia/cpu/ppc/ppc_emit.h index f6c128363..3117886da 100644 --- a/src/xenia/cpu/frontend/ppc_emit.h +++ b/src/xenia/cpu/ppc/ppc_emit.h @@ -7,14 +7,14 @@ ****************************************************************************** */ -#ifndef XENIA_CPU_FRONTEND_PPC_EMIT_H_ -#define XENIA_CPU_FRONTEND_PPC_EMIT_H_ +#ifndef XENIA_CPU_PPC_PPC_EMIT_H_ +#define XENIA_CPU_PPC_PPC_EMIT_H_ -#include "xenia/cpu/frontend/ppc_instr.h" +#include "xenia/cpu/ppc/ppc_instr.h" namespace xe { namespace cpu { -namespace frontend { +namespace ppc { void RegisterEmitCategoryAltivec(); void RegisterEmitCategoryALU(); @@ -22,8 +22,8 @@ void RegisterEmitCategoryControl(); void RegisterEmitCategoryFPU(); void RegisterEmitCategoryMemory(); -} // namespace frontend +} // namespace ppc } // namespace cpu } // namespace xe -#endif // XENIA_CPU_FRONTEND_PPC_EMIT_H_ +#endif // XENIA_CPU_PPC_PPC_EMIT_H_ diff --git a/src/xenia/cpu/frontend/ppc_emit_altivec.cc b/src/xenia/cpu/ppc/ppc_emit_altivec.cc similarity index 99% rename from src/xenia/cpu/frontend/ppc_emit_altivec.cc rename to src/xenia/cpu/ppc/ppc_emit_altivec.cc index 0c15a5736..10ec0ca1b 100644 --- a/src/xenia/cpu/frontend/ppc_emit_altivec.cc +++ b/src/xenia/cpu/ppc/ppc_emit_altivec.cc @@ -7,15 +7,15 @@ ****************************************************************************** */ -#include "xenia/cpu/frontend/ppc_emit-private.h" +#include "xenia/cpu/ppc/ppc_emit-private.h" #include "xenia/base/assert.h" -#include "xenia/cpu/frontend/ppc_context.h" -#include "xenia/cpu/frontend/ppc_hir_builder.h" +#include "xenia/cpu/ppc/ppc_context.h" +#include "xenia/cpu/ppc/ppc_hir_builder.h" namespace xe { namespace cpu { -namespace frontend { +namespace ppc { // TODO(benvanik): remove when enums redefined. using namespace xe::cpu::hir; @@ -2440,6 +2440,6 @@ void RegisterEmitCategoryAltivec() { XEREGISTERINSTR(vxor128, VX128(5, 784)); } -} // namespace frontend +} // namespace ppc } // namespace cpu } // namespace xe diff --git a/src/xenia/cpu/frontend/ppc_emit_alu.cc b/src/xenia/cpu/ppc/ppc_emit_alu.cc similarity index 99% rename from src/xenia/cpu/frontend/ppc_emit_alu.cc rename to src/xenia/cpu/ppc/ppc_emit_alu.cc index 3be51eeae..e4e8834eb 100644 --- a/src/xenia/cpu/frontend/ppc_emit_alu.cc +++ b/src/xenia/cpu/ppc/ppc_emit_alu.cc @@ -7,15 +7,15 @@ ****************************************************************************** */ -#include "xenia/cpu/frontend/ppc_emit-private.h" +#include "xenia/cpu/ppc/ppc_emit-private.h" #include "xenia/base/assert.h" -#include "xenia/cpu/frontend/ppc_context.h" -#include "xenia/cpu/frontend/ppc_hir_builder.h" +#include "xenia/cpu/ppc/ppc_context.h" +#include "xenia/cpu/ppc/ppc_hir_builder.h" namespace xe { namespace cpu { -namespace frontend { +namespace ppc { // TODO(benvanik): remove when enums redefined. using namespace xe::cpu::hir; @@ -1304,6 +1304,6 @@ void RegisterEmitCategoryALU() { XEREGISTERINSTR(srawix, 0x7C000670); } -} // namespace frontend +} // namespace ppc } // namespace cpu } // namespace xe diff --git a/src/xenia/cpu/frontend/ppc_emit_control.cc b/src/xenia/cpu/ppc/ppc_emit_control.cc similarity index 98% rename from src/xenia/cpu/frontend/ppc_emit_control.cc rename to src/xenia/cpu/ppc/ppc_emit_control.cc index 22958438e..19600d976 100644 --- a/src/xenia/cpu/frontend/ppc_emit_control.cc +++ b/src/xenia/cpu/ppc/ppc_emit_control.cc @@ -7,16 +7,16 @@ ****************************************************************************** */ -#include "xenia/cpu/frontend/ppc_emit-private.h" +#include "xenia/cpu/ppc/ppc_emit-private.h" #include "xenia/base/assert.h" -#include "xenia/cpu/frontend/ppc_context.h" -#include "xenia/cpu/frontend/ppc_frontend.h" -#include "xenia/cpu/frontend/ppc_hir_builder.h" +#include "xenia/cpu/ppc/ppc_context.h" +#include "xenia/cpu/ppc/ppc_frontend.h" +#include "xenia/cpu/ppc/ppc_hir_builder.h" namespace xe { namespace cpu { -namespace frontend { +namespace ppc { // TODO(benvanik): remove when enums redefined. using namespace xe::cpu::hir; @@ -788,6 +788,6 @@ void RegisterEmitCategoryControl() { XEREGISTERINSTR(mtmsrd, 0x7C000164); } -} // namespace frontend +} // namespace ppc } // namespace cpu } // namespace xe diff --git a/src/xenia/cpu/frontend/ppc_emit_fpu.cc b/src/xenia/cpu/ppc/ppc_emit_fpu.cc similarity index 98% rename from src/xenia/cpu/frontend/ppc_emit_fpu.cc rename to src/xenia/cpu/ppc/ppc_emit_fpu.cc index ccd0f9c0c..5378e464a 100644 --- a/src/xenia/cpu/frontend/ppc_emit_fpu.cc +++ b/src/xenia/cpu/ppc/ppc_emit_fpu.cc @@ -7,15 +7,15 @@ ****************************************************************************** */ -#include "xenia/cpu/frontend/ppc_emit-private.h" +#include "xenia/cpu/ppc/ppc_emit-private.h" #include "xenia/base/assert.h" -#include "xenia/cpu/frontend/ppc_context.h" -#include "xenia/cpu/frontend/ppc_hir_builder.h" +#include "xenia/cpu/ppc/ppc_context.h" +#include "xenia/cpu/ppc/ppc_hir_builder.h" namespace xe { namespace cpu { -namespace frontend { +namespace ppc { // TODO(benvanik): remove when enums redefined. using namespace xe::cpu::hir; @@ -579,6 +579,6 @@ void RegisterEmitCategoryFPU() { XEREGISTERINSTR(fnegx, 0xFC000050); } -} // namespace frontend +} // namespace ppc } // namespace cpu } // namespace xe diff --git a/src/xenia/cpu/frontend/ppc_emit_memory.cc b/src/xenia/cpu/ppc/ppc_emit_memory.cc similarity index 99% rename from src/xenia/cpu/frontend/ppc_emit_memory.cc rename to src/xenia/cpu/ppc/ppc_emit_memory.cc index ee9ec2462..7a5a5679c 100644 --- a/src/xenia/cpu/frontend/ppc_emit_memory.cc +++ b/src/xenia/cpu/ppc/ppc_emit_memory.cc @@ -7,15 +7,15 @@ ****************************************************************************** */ -#include "xenia/cpu/frontend/ppc_emit-private.h" +#include "xenia/cpu/ppc/ppc_emit-private.h" #include "xenia/base/assert.h" -#include "xenia/cpu/frontend/ppc_context.h" -#include "xenia/cpu/frontend/ppc_hir_builder.h" +#include "xenia/cpu/ppc/ppc_context.h" +#include "xenia/cpu/ppc/ppc_hir_builder.h" namespace xe { namespace cpu { -namespace frontend { +namespace ppc { // TODO(benvanik): remove when enums redefined. using namespace xe::cpu::hir; @@ -1098,6 +1098,6 @@ void RegisterEmitCategoryMemory() { XEREGISTERINSTR(icbi, 0x7C0007AC); } -} // namespace frontend +} // namespace ppc } // namespace cpu } // namespace xe diff --git a/src/xenia/cpu/frontend/ppc_frontend.cc b/src/xenia/cpu/ppc/ppc_frontend.cc similarity index 93% rename from src/xenia/cpu/frontend/ppc_frontend.cc rename to src/xenia/cpu/ppc/ppc_frontend.cc index cb471d1b8..c95b63bf6 100644 --- a/src/xenia/cpu/frontend/ppc_frontend.cc +++ b/src/xenia/cpu/ppc/ppc_frontend.cc @@ -7,18 +7,18 @@ ****************************************************************************** */ -#include "xenia/cpu/frontend/ppc_frontend.h" +#include "xenia/cpu/ppc/ppc_frontend.h" #include "xenia/base/atomic.h" -#include "xenia/cpu/frontend/ppc_context.h" -#include "xenia/cpu/frontend/ppc_disasm.h" -#include "xenia/cpu/frontend/ppc_emit.h" -#include "xenia/cpu/frontend/ppc_translator.h" +#include "xenia/cpu/ppc/ppc_context.h" +#include "xenia/cpu/ppc/ppc_disasm.h" +#include "xenia/cpu/ppc/ppc_emit.h" +#include "xenia/cpu/ppc/ppc_translator.h" #include "xenia/cpu/processor.h" namespace xe { namespace cpu { -namespace frontend { +namespace ppc { void InitializeIfNeeded(); void CleanupOnShutdown(); @@ -107,6 +107,6 @@ bool PPCFrontend::DefineFunction(GuestFunction* function, return result; } -} // namespace frontend +} // namespace ppc } // namespace cpu } // namespace xe diff --git a/src/xenia/cpu/frontend/ppc_frontend.h b/src/xenia/cpu/ppc/ppc_frontend.h similarity index 88% rename from src/xenia/cpu/frontend/ppc_frontend.h rename to src/xenia/cpu/ppc/ppc_frontend.h index 445393708..7a6acd63b 100644 --- a/src/xenia/cpu/frontend/ppc_frontend.h +++ b/src/xenia/cpu/ppc/ppc_frontend.h @@ -7,8 +7,8 @@ ****************************************************************************** */ -#ifndef XENIA_CPU_FRONTEND_PPC_FRONTEND_H_ -#define XENIA_CPU_FRONTEND_PPC_FRONTEND_H_ +#ifndef XENIA_CPU_PPC_PPC_FRONTEND_H_ +#define XENIA_CPU_PPC_PPC_FRONTEND_H_ #include @@ -24,7 +24,7 @@ class Processor; namespace xe { namespace cpu { -namespace frontend { +namespace ppc { class PPCTranslator; @@ -55,8 +55,8 @@ class PPCFrontend { TypePool translator_pool_; }; -} // namespace frontend +} // namespace ppc } // namespace cpu } // namespace xe -#endif // XENIA_CPU_FRONTEND_PPC_FRONTEND_H_ +#endif // XENIA_CPU_PPC_PPC_FRONTEND_H_ diff --git a/src/xenia/cpu/frontend/ppc_hir_builder.cc b/src/xenia/cpu/ppc/ppc_hir_builder.cc similarity index 98% rename from src/xenia/cpu/frontend/ppc_hir_builder.cc rename to src/xenia/cpu/ppc/ppc_hir_builder.cc index 7a02ef3c4..e9391cd15 100644 --- a/src/xenia/cpu/frontend/ppc_hir_builder.cc +++ b/src/xenia/cpu/ppc/ppc_hir_builder.cc @@ -7,7 +7,7 @@ ****************************************************************************** */ -#include "xenia/cpu/frontend/ppc_hir_builder.h" +#include "xenia/cpu/ppc/ppc_hir_builder.h" #include @@ -16,16 +16,16 @@ #include "xenia/base/memory.h" #include "xenia/base/profiling.h" #include "xenia/cpu/cpu_flags.h" -#include "xenia/cpu/frontend/ppc_context.h" -#include "xenia/cpu/frontend/ppc_disasm.h" -#include "xenia/cpu/frontend/ppc_frontend.h" -#include "xenia/cpu/frontend/ppc_instr.h" #include "xenia/cpu/hir/label.h" +#include "xenia/cpu/ppc/ppc_context.h" +#include "xenia/cpu/ppc/ppc_disasm.h" +#include "xenia/cpu/ppc/ppc_frontend.h" +#include "xenia/cpu/ppc/ppc_instr.h" #include "xenia/cpu/processor.h" namespace xe { namespace cpu { -namespace frontend { +namespace ppc { // TODO(benvanik): remove when enums redefined. using namespace xe::cpu::hir; @@ -439,6 +439,6 @@ void PPCHIRBuilder::StoreVR(uint32_t reg, Value* value) { trace_reg.value = value; } -} // namespace frontend +} // namespace ppc } // namespace cpu } // namespace xe diff --git a/src/xenia/cpu/frontend/ppc_hir_builder.h b/src/xenia/cpu/ppc/ppc_hir_builder.h similarity index 93% rename from src/xenia/cpu/frontend/ppc_hir_builder.h rename to src/xenia/cpu/ppc/ppc_hir_builder.h index d47079f4e..634919be4 100644 --- a/src/xenia/cpu/frontend/ppc_hir_builder.h +++ b/src/xenia/cpu/ppc/ppc_hir_builder.h @@ -7,8 +7,8 @@ ****************************************************************************** */ -#ifndef XENIA_CPU_FRONTEND_PPC_HIR_BUILDER_H_ -#define XENIA_CPU_FRONTEND_PPC_HIR_BUILDER_H_ +#ifndef XENIA_CPU_PPC_PPC_HIR_BUILDER_H_ +#define XENIA_CPU_PPC_PPC_HIR_BUILDER_H_ #include "xenia/base/string_buffer.h" #include "xenia/cpu/function.h" @@ -16,7 +16,7 @@ namespace xe { namespace cpu { -namespace frontend { +namespace ppc { struct PPCBuiltins; class PPCFrontend; @@ -102,8 +102,8 @@ class PPCHIRBuilder : public hir::HIRBuilder { } trace_info_; }; -} // namespace frontend +} // namespace ppc } // namespace cpu } // namespace xe -#endif // XENIA_CPU_FRONTEND_PPC_HIR_BUILDER_H_ +#endif // XENIA_CPU_PPC_PPC_HIR_BUILDER_H_ diff --git a/src/xenia/cpu/frontend/ppc_instr.cc b/src/xenia/cpu/ppc/ppc_instr.cc similarity index 98% rename from src/xenia/cpu/frontend/ppc_instr.cc rename to src/xenia/cpu/ppc/ppc_instr.cc index 5eb6b40c7..0250ba694 100644 --- a/src/xenia/cpu/frontend/ppc_instr.cc +++ b/src/xenia/cpu/ppc/ppc_instr.cc @@ -7,7 +7,7 @@ ****************************************************************************** */ -#include "xenia/cpu/frontend/ppc_instr.h" +#include "xenia/cpu/ppc/ppc_instr.h" #include #include @@ -16,11 +16,11 @@ #include "xenia/base/assert.h" #include "xenia/base/math.h" #include "xenia/base/string_buffer.h" -#include "xenia/cpu/frontend/ppc_instr_tables.h" +#include "xenia/cpu/ppc/ppc_instr_tables.h" namespace xe { namespace cpu { -namespace frontend { +namespace ppc { std::vector all_instrs_; @@ -405,6 +405,6 @@ int RegisterInstrEmit(uint32_t code, InstrEmitFn emit) { return 0; } -} // namespace frontend +} // namespace ppc } // namespace cpu } // namespace xe diff --git a/src/xenia/cpu/frontend/ppc_instr.h b/src/xenia/cpu/ppc/ppc_instr.h similarity index 98% rename from src/xenia/cpu/frontend/ppc_instr.h rename to src/xenia/cpu/ppc/ppc_instr.h index a1b8fc96d..deeb561d0 100644 --- a/src/xenia/cpu/frontend/ppc_instr.h +++ b/src/xenia/cpu/ppc/ppc_instr.h @@ -7,8 +7,8 @@ ****************************************************************************** */ -#ifndef XENIA_CPU_FRONTEND_PPC_INSTR_H_ -#define XENIA_CPU_FRONTEND_PPC_INSTR_H_ +#ifndef XENIA_CPU_PPC_PPC_INSTR_H_ +#define XENIA_CPU_PPC_PPC_INSTR_H_ #include #include @@ -18,7 +18,7 @@ namespace xe { namespace cpu { -namespace frontend { +namespace ppc { inline uint32_t make_bitmask(uint32_t a, uint32_t b) { return (static_cast(-1) >> (31 - b)) & ~((1u << a) - 1); @@ -519,8 +519,8 @@ void DumpAllInstrCounts(); InstrType* GetInstrType(uint32_t code); int RegisterInstrEmit(uint32_t code, InstrEmitFn emit); -} // namespace frontend +} // namespace ppc } // namespace cpu } // namespace xe -#endif // XENIA_CPU_FRONTEND_PPC_INSTR_H_ +#endif // XENIA_CPU_PPC_PPC_INSTR_H_ diff --git a/src/xenia/cpu/frontend/ppc_instr_tables.h b/src/xenia/cpu/ppc/ppc_instr_tables.h similarity index 99% rename from src/xenia/cpu/frontend/ppc_instr_tables.h rename to src/xenia/cpu/ppc/ppc_instr_tables.h index f5dfb5fc4..4baef1bc3 100644 --- a/src/xenia/cpu/frontend/ppc_instr_tables.h +++ b/src/xenia/cpu/ppc/ppc_instr_tables.h @@ -7,18 +7,18 @@ ****************************************************************************** */ -#ifndef XENIA_CPU_FRONTEND_PPC_INSTR_TABLES_H_ -#define XENIA_CPU_FRONTEND_PPC_INSTR_TABLES_H_ +#ifndef XENIA_CPU_PPC_PPC_INSTR_TABLES_H_ +#define XENIA_CPU_PPC_PPC_INSTR_TABLES_H_ #include #include "xenia/base/math.h" #include "xenia/base/string_buffer.h" -#include "xenia/cpu/frontend/ppc_instr.h" +#include "xenia/cpu/ppc/ppc_instr.h" namespace xe { namespace cpu { -namespace frontend { +namespace ppc { void Disasm_0(InstrData* i, StringBuffer* str); void Disasm__(InstrData* i, StringBuffer* str); @@ -1093,8 +1093,8 @@ static InstrType instr_table_scan[] = { #undef EMPTY } // namespace tables -} // namespace frontend +} // namespace ppc } // namespace cpu } // namespace xe -#endif // XENIA_CPU_FRONTEND_PPC_INSTR_TABLES_H_ +#endif // XENIA_CPU_PPC_PPC_INSTR_TABLES_H_ diff --git a/src/xenia/cpu/frontend/ppc_scanner.cc b/src/xenia/cpu/ppc/ppc_scanner.cc similarity index 98% rename from src/xenia/cpu/frontend/ppc_scanner.cc rename to src/xenia/cpu/ppc/ppc_scanner.cc index 5bb3885cf..253376dee 100644 --- a/src/xenia/cpu/frontend/ppc_scanner.cc +++ b/src/xenia/cpu/ppc/ppc_scanner.cc @@ -7,7 +7,7 @@ ****************************************************************************** */ -#include "xenia/cpu/frontend/ppc_scanner.h" +#include "xenia/cpu/ppc/ppc_scanner.h" #include #include @@ -15,8 +15,8 @@ #include "xenia/base/logging.h" #include "xenia/base/memory.h" #include "xenia/base/profiling.h" -#include "xenia/cpu/frontend/ppc_frontend.h" -#include "xenia/cpu/frontend/ppc_instr.h" +#include "xenia/cpu/ppc/ppc_frontend.h" +#include "xenia/cpu/ppc/ppc_instr.h" #include "xenia/cpu/processor.h" #if 0 @@ -29,7 +29,7 @@ namespace xe { namespace cpu { -namespace frontend { +namespace ppc { PPCScanner::PPCScanner(PPCFrontend* frontend) : frontend_(frontend) {} @@ -366,6 +366,6 @@ std::vector PPCScanner::FindBlocks(GuestFunction* function) { return blocks; } -} // namespace frontend +} // namespace ppc } // namespace cpu } // namespace xe diff --git a/src/xenia/cpu/frontend/ppc_scanner.h b/src/xenia/cpu/ppc/ppc_scanner.h similarity index 85% rename from src/xenia/cpu/frontend/ppc_scanner.h rename to src/xenia/cpu/ppc/ppc_scanner.h index f83520265..bb2aa1149 100644 --- a/src/xenia/cpu/frontend/ppc_scanner.h +++ b/src/xenia/cpu/ppc/ppc_scanner.h @@ -7,8 +7,8 @@ ****************************************************************************** */ -#ifndef XENIA_CPU_FRONTEND_PPC_SCANNER_H_ -#define XENIA_CPU_FRONTEND_PPC_SCANNER_H_ +#ifndef XENIA_CPU_PPC_PPC_SCANNER_H_ +#define XENIA_CPU_PPC_PPC_SCANNER_H_ #include @@ -17,7 +17,7 @@ namespace xe { namespace cpu { -namespace frontend { +namespace ppc { class PPCFrontend; @@ -41,8 +41,8 @@ class PPCScanner { PPCFrontend* frontend_ = nullptr; }; -} // namespace frontend +} // namespace ppc } // namespace cpu } // namespace xe -#endif // XENIA_CPU_FRONTEND_PPC_SCANNER_H_ +#endif // XENIA_CPU_PPC_PPC_SCANNER_H_ diff --git a/src/xenia/cpu/frontend/ppc_translator.cc b/src/xenia/cpu/ppc/ppc_translator.cc similarity index 96% rename from src/xenia/cpu/frontend/ppc_translator.cc rename to src/xenia/cpu/ppc/ppc_translator.cc index c4f5ac99c..08df5085a 100644 --- a/src/xenia/cpu/frontend/ppc_translator.cc +++ b/src/xenia/cpu/ppc/ppc_translator.cc @@ -7,7 +7,7 @@ ****************************************************************************** */ -#include "xenia/cpu/frontend/ppc_translator.h" +#include "xenia/cpu/ppc/ppc_translator.h" #include @@ -18,11 +18,11 @@ #include "xenia/base/reset_scope.h" #include "xenia/cpu/compiler/compiler_passes.h" #include "xenia/cpu/cpu_flags.h" -#include "xenia/cpu/frontend/ppc_disasm.h" -#include "xenia/cpu/frontend/ppc_frontend.h" -#include "xenia/cpu/frontend/ppc_hir_builder.h" -#include "xenia/cpu/frontend/ppc_instr.h" -#include "xenia/cpu/frontend/ppc_scanner.h" +#include "xenia/cpu/ppc/ppc_disasm.h" +#include "xenia/cpu/ppc/ppc_frontend.h" +#include "xenia/cpu/ppc/ppc_hir_builder.h" +#include "xenia/cpu/ppc/ppc_instr.h" +#include "xenia/cpu/ppc/ppc_scanner.h" #include "xenia/cpu/processor.h" #include "xenia/debug/debugger.h" @@ -31,7 +31,7 @@ DEFINE_bool(preserve_hir_disasm, true, namespace xe { namespace cpu { -namespace frontend { +namespace ppc { using xe::cpu::backend::Backend; using xe::cpu::compiler::Compiler; @@ -167,7 +167,7 @@ bool PPCTranslator::Translate(GuestFunction* function, } if (false) { - xe::cpu::frontend::DumpAllInstrCounts(); + DumpAllInstrCounts(); } // Emit function. @@ -241,6 +241,6 @@ void PPCTranslator::DumpSource(GuestFunction* function, } } -} // namespace frontend +} // namespace ppc } // namespace cpu } // namespace xe diff --git a/src/xenia/cpu/frontend/ppc_translator.h b/src/xenia/cpu/ppc/ppc_translator.h similarity index 87% rename from src/xenia/cpu/frontend/ppc_translator.h rename to src/xenia/cpu/ppc/ppc_translator.h index dd1489387..56cec59ab 100644 --- a/src/xenia/cpu/frontend/ppc_translator.h +++ b/src/xenia/cpu/ppc/ppc_translator.h @@ -7,8 +7,8 @@ ****************************************************************************** */ -#ifndef XENIA_CPU_FRONTEND_PPC_TRANSLATOR_H_ -#define XENIA_CPU_FRONTEND_PPC_TRANSLATOR_H_ +#ifndef XENIA_CPU_PPC_PPC_TRANSLATOR_H_ +#define XENIA_CPU_PPC_PPC_TRANSLATOR_H_ #include @@ -19,7 +19,7 @@ namespace xe { namespace cpu { -namespace frontend { +namespace ppc { class PPCFrontend; class PPCHIRBuilder; @@ -44,8 +44,8 @@ class PPCTranslator { StringBuffer string_buffer_; }; -} // namespace frontend +} // namespace ppc } // namespace cpu } // namespace xe -#endif // XENIA_CPU_FRONTEND_PPC_TRANSLATOR_H_ +#endif // XENIA_CPU_PPC_PPC_TRANSLATOR_H_ diff --git a/src/xenia/cpu/frontend/testing/README.md b/src/xenia/cpu/ppc/testing/README.md similarity index 100% rename from src/xenia/cpu/frontend/testing/README.md rename to src/xenia/cpu/ppc/testing/README.md diff --git a/src/xenia/cpu/frontend/testing/instr_add.s b/src/xenia/cpu/ppc/testing/instr_add.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_add.s rename to src/xenia/cpu/ppc/testing/instr_add.s diff --git a/src/xenia/cpu/frontend/testing/instr_addc.s b/src/xenia/cpu/ppc/testing/instr_addc.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_addc.s rename to src/xenia/cpu/ppc/testing/instr_addc.s diff --git a/src/xenia/cpu/frontend/testing/instr_adde.s b/src/xenia/cpu/ppc/testing/instr_adde.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_adde.s rename to src/xenia/cpu/ppc/testing/instr_adde.s diff --git a/src/xenia/cpu/frontend/testing/instr_addic.s b/src/xenia/cpu/ppc/testing/instr_addic.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_addic.s rename to src/xenia/cpu/ppc/testing/instr_addic.s diff --git a/src/xenia/cpu/frontend/testing/instr_addis.s b/src/xenia/cpu/ppc/testing/instr_addis.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_addis.s rename to src/xenia/cpu/ppc/testing/instr_addis.s diff --git a/src/xenia/cpu/frontend/testing/instr_addme.s b/src/xenia/cpu/ppc/testing/instr_addme.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_addme.s rename to src/xenia/cpu/ppc/testing/instr_addme.s diff --git a/src/xenia/cpu/frontend/testing/instr_addze.s b/src/xenia/cpu/ppc/testing/instr_addze.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_addze.s rename to src/xenia/cpu/ppc/testing/instr_addze.s diff --git a/src/xenia/cpu/frontend/testing/instr_and.s b/src/xenia/cpu/ppc/testing/instr_and.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_and.s rename to src/xenia/cpu/ppc/testing/instr_and.s diff --git a/src/xenia/cpu/frontend/testing/instr_andc.s b/src/xenia/cpu/ppc/testing/instr_andc.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_andc.s rename to src/xenia/cpu/ppc/testing/instr_andc.s diff --git a/src/xenia/cpu/frontend/testing/instr_andi.s b/src/xenia/cpu/ppc/testing/instr_andi.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_andi.s rename to src/xenia/cpu/ppc/testing/instr_andi.s diff --git a/src/xenia/cpu/frontend/testing/instr_andis.s b/src/xenia/cpu/ppc/testing/instr_andis.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_andis.s rename to src/xenia/cpu/ppc/testing/instr_andis.s diff --git a/src/xenia/cpu/frontend/testing/instr_cmp.s b/src/xenia/cpu/ppc/testing/instr_cmp.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_cmp.s rename to src/xenia/cpu/ppc/testing/instr_cmp.s diff --git a/src/xenia/cpu/frontend/testing/instr_cmpi.s b/src/xenia/cpu/ppc/testing/instr_cmpi.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_cmpi.s rename to src/xenia/cpu/ppc/testing/instr_cmpi.s diff --git a/src/xenia/cpu/frontend/testing/instr_cmpl.s b/src/xenia/cpu/ppc/testing/instr_cmpl.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_cmpl.s rename to src/xenia/cpu/ppc/testing/instr_cmpl.s diff --git a/src/xenia/cpu/frontend/testing/instr_cmpli.s b/src/xenia/cpu/ppc/testing/instr_cmpli.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_cmpli.s rename to src/xenia/cpu/ppc/testing/instr_cmpli.s diff --git a/src/xenia/cpu/frontend/testing/instr_cntlzd.s b/src/xenia/cpu/ppc/testing/instr_cntlzd.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_cntlzd.s rename to src/xenia/cpu/ppc/testing/instr_cntlzd.s diff --git a/src/xenia/cpu/frontend/testing/instr_cntlzw.s b/src/xenia/cpu/ppc/testing/instr_cntlzw.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_cntlzw.s rename to src/xenia/cpu/ppc/testing/instr_cntlzw.s diff --git a/src/xenia/cpu/frontend/testing/instr_divd.s b/src/xenia/cpu/ppc/testing/instr_divd.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_divd.s rename to src/xenia/cpu/ppc/testing/instr_divd.s diff --git a/src/xenia/cpu/frontend/testing/instr_divdu.s b/src/xenia/cpu/ppc/testing/instr_divdu.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_divdu.s rename to src/xenia/cpu/ppc/testing/instr_divdu.s diff --git a/src/xenia/cpu/frontend/testing/instr_divw.s b/src/xenia/cpu/ppc/testing/instr_divw.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_divw.s rename to src/xenia/cpu/ppc/testing/instr_divw.s diff --git a/src/xenia/cpu/frontend/testing/instr_divwu.s b/src/xenia/cpu/ppc/testing/instr_divwu.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_divwu.s rename to src/xenia/cpu/ppc/testing/instr_divwu.s diff --git a/src/xenia/cpu/frontend/testing/instr_eqv.s b/src/xenia/cpu/ppc/testing/instr_eqv.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_eqv.s rename to src/xenia/cpu/ppc/testing/instr_eqv.s diff --git a/src/xenia/cpu/frontend/testing/instr_extsb.s b/src/xenia/cpu/ppc/testing/instr_extsb.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_extsb.s rename to src/xenia/cpu/ppc/testing/instr_extsb.s diff --git a/src/xenia/cpu/frontend/testing/instr_extsh.s b/src/xenia/cpu/ppc/testing/instr_extsh.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_extsh.s rename to src/xenia/cpu/ppc/testing/instr_extsh.s diff --git a/src/xenia/cpu/frontend/testing/instr_extsw.s b/src/xenia/cpu/ppc/testing/instr_extsw.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_extsw.s rename to src/xenia/cpu/ppc/testing/instr_extsw.s diff --git a/src/xenia/cpu/frontend/testing/instr_fabs.s b/src/xenia/cpu/ppc/testing/instr_fabs.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_fabs.s rename to src/xenia/cpu/ppc/testing/instr_fabs.s diff --git a/src/xenia/cpu/frontend/testing/instr_fadd.s b/src/xenia/cpu/ppc/testing/instr_fadd.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_fadd.s rename to src/xenia/cpu/ppc/testing/instr_fadd.s diff --git a/src/xenia/cpu/frontend/testing/instr_fmadd.s b/src/xenia/cpu/ppc/testing/instr_fmadd.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_fmadd.s rename to src/xenia/cpu/ppc/testing/instr_fmadd.s diff --git a/src/xenia/cpu/frontend/testing/instr_fmadds.s b/src/xenia/cpu/ppc/testing/instr_fmadds.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_fmadds.s rename to src/xenia/cpu/ppc/testing/instr_fmadds.s diff --git a/src/xenia/cpu/frontend/testing/instr_fmul.s b/src/xenia/cpu/ppc/testing/instr_fmul.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_fmul.s rename to src/xenia/cpu/ppc/testing/instr_fmul.s diff --git a/src/xenia/cpu/frontend/testing/instr_fnabs.s b/src/xenia/cpu/ppc/testing/instr_fnabs.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_fnabs.s rename to src/xenia/cpu/ppc/testing/instr_fnabs.s diff --git a/src/xenia/cpu/frontend/testing/instr_frsqrte.s b/src/xenia/cpu/ppc/testing/instr_frsqrte.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_frsqrte.s rename to src/xenia/cpu/ppc/testing/instr_frsqrte.s diff --git a/src/xenia/cpu/frontend/testing/instr_fsel.s b/src/xenia/cpu/ppc/testing/instr_fsel.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_fsel.s rename to src/xenia/cpu/ppc/testing/instr_fsel.s diff --git a/src/xenia/cpu/frontend/testing/instr_fsqrt.s b/src/xenia/cpu/ppc/testing/instr_fsqrt.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_fsqrt.s rename to src/xenia/cpu/ppc/testing/instr_fsqrt.s diff --git a/src/xenia/cpu/frontend/testing/instr_lvexx.s b/src/xenia/cpu/ppc/testing/instr_lvexx.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_lvexx.s rename to src/xenia/cpu/ppc/testing/instr_lvexx.s diff --git a/src/xenia/cpu/frontend/testing/instr_lvl.s b/src/xenia/cpu/ppc/testing/instr_lvl.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_lvl.s rename to src/xenia/cpu/ppc/testing/instr_lvl.s diff --git a/src/xenia/cpu/frontend/testing/instr_lvr.s b/src/xenia/cpu/ppc/testing/instr_lvr.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_lvr.s rename to src/xenia/cpu/ppc/testing/instr_lvr.s diff --git a/src/xenia/cpu/frontend/testing/instr_lvsl.s b/src/xenia/cpu/ppc/testing/instr_lvsl.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_lvsl.s rename to src/xenia/cpu/ppc/testing/instr_lvsl.s diff --git a/src/xenia/cpu/frontend/testing/instr_lvsr.s b/src/xenia/cpu/ppc/testing/instr_lvsr.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_lvsr.s rename to src/xenia/cpu/ppc/testing/instr_lvsr.s diff --git a/src/xenia/cpu/frontend/testing/instr_mulhd.s b/src/xenia/cpu/ppc/testing/instr_mulhd.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_mulhd.s rename to src/xenia/cpu/ppc/testing/instr_mulhd.s diff --git a/src/xenia/cpu/frontend/testing/instr_mulhdu.s b/src/xenia/cpu/ppc/testing/instr_mulhdu.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_mulhdu.s rename to src/xenia/cpu/ppc/testing/instr_mulhdu.s diff --git a/src/xenia/cpu/frontend/testing/instr_mulhw.s b/src/xenia/cpu/ppc/testing/instr_mulhw.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_mulhw.s rename to src/xenia/cpu/ppc/testing/instr_mulhw.s diff --git a/src/xenia/cpu/frontend/testing/instr_mulhwu.s b/src/xenia/cpu/ppc/testing/instr_mulhwu.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_mulhwu.s rename to src/xenia/cpu/ppc/testing/instr_mulhwu.s diff --git a/src/xenia/cpu/frontend/testing/instr_mulld.s b/src/xenia/cpu/ppc/testing/instr_mulld.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_mulld.s rename to src/xenia/cpu/ppc/testing/instr_mulld.s diff --git a/src/xenia/cpu/frontend/testing/instr_mulli.s b/src/xenia/cpu/ppc/testing/instr_mulli.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_mulli.s rename to src/xenia/cpu/ppc/testing/instr_mulli.s diff --git a/src/xenia/cpu/frontend/testing/instr_mullw.s b/src/xenia/cpu/ppc/testing/instr_mullw.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_mullw.s rename to src/xenia/cpu/ppc/testing/instr_mullw.s diff --git a/src/xenia/cpu/frontend/testing/instr_neg.s b/src/xenia/cpu/ppc/testing/instr_neg.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_neg.s rename to src/xenia/cpu/ppc/testing/instr_neg.s diff --git a/src/xenia/cpu/frontend/testing/instr_nor.s b/src/xenia/cpu/ppc/testing/instr_nor.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_nor.s rename to src/xenia/cpu/ppc/testing/instr_nor.s diff --git a/src/xenia/cpu/frontend/testing/instr_ori.s b/src/xenia/cpu/ppc/testing/instr_ori.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_ori.s rename to src/xenia/cpu/ppc/testing/instr_ori.s diff --git a/src/xenia/cpu/frontend/testing/instr_rldicl.s b/src/xenia/cpu/ppc/testing/instr_rldicl.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_rldicl.s rename to src/xenia/cpu/ppc/testing/instr_rldicl.s diff --git a/src/xenia/cpu/frontend/testing/instr_rldicr.s b/src/xenia/cpu/ppc/testing/instr_rldicr.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_rldicr.s rename to src/xenia/cpu/ppc/testing/instr_rldicr.s diff --git a/src/xenia/cpu/frontend/testing/instr_rlwimi.s b/src/xenia/cpu/ppc/testing/instr_rlwimi.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_rlwimi.s rename to src/xenia/cpu/ppc/testing/instr_rlwimi.s diff --git a/src/xenia/cpu/frontend/testing/instr_rlwinm.s b/src/xenia/cpu/ppc/testing/instr_rlwinm.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_rlwinm.s rename to src/xenia/cpu/ppc/testing/instr_rlwinm.s diff --git a/src/xenia/cpu/frontend/testing/instr_rlwnm.s b/src/xenia/cpu/ppc/testing/instr_rlwnm.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_rlwnm.s rename to src/xenia/cpu/ppc/testing/instr_rlwnm.s diff --git a/src/xenia/cpu/frontend/testing/instr_sld.s b/src/xenia/cpu/ppc/testing/instr_sld.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_sld.s rename to src/xenia/cpu/ppc/testing/instr_sld.s diff --git a/src/xenia/cpu/frontend/testing/instr_slw.s b/src/xenia/cpu/ppc/testing/instr_slw.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_slw.s rename to src/xenia/cpu/ppc/testing/instr_slw.s diff --git a/src/xenia/cpu/frontend/testing/instr_srad.s b/src/xenia/cpu/ppc/testing/instr_srad.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_srad.s rename to src/xenia/cpu/ppc/testing/instr_srad.s diff --git a/src/xenia/cpu/frontend/testing/instr_sradi.s b/src/xenia/cpu/ppc/testing/instr_sradi.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_sradi.s rename to src/xenia/cpu/ppc/testing/instr_sradi.s diff --git a/src/xenia/cpu/frontend/testing/instr_sraw.s b/src/xenia/cpu/ppc/testing/instr_sraw.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_sraw.s rename to src/xenia/cpu/ppc/testing/instr_sraw.s diff --git a/src/xenia/cpu/frontend/testing/instr_srawi.s b/src/xenia/cpu/ppc/testing/instr_srawi.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_srawi.s rename to src/xenia/cpu/ppc/testing/instr_srawi.s diff --git a/src/xenia/cpu/frontend/testing/instr_srd.s b/src/xenia/cpu/ppc/testing/instr_srd.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_srd.s rename to src/xenia/cpu/ppc/testing/instr_srd.s diff --git a/src/xenia/cpu/frontend/testing/instr_srw.s b/src/xenia/cpu/ppc/testing/instr_srw.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_srw.s rename to src/xenia/cpu/ppc/testing/instr_srw.s diff --git a/src/xenia/cpu/frontend/testing/instr_stvew.s b/src/xenia/cpu/ppc/testing/instr_stvew.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_stvew.s rename to src/xenia/cpu/ppc/testing/instr_stvew.s diff --git a/src/xenia/cpu/frontend/testing/instr_stvl.s b/src/xenia/cpu/ppc/testing/instr_stvl.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_stvl.s rename to src/xenia/cpu/ppc/testing/instr_stvl.s diff --git a/src/xenia/cpu/frontend/testing/instr_stvr.s b/src/xenia/cpu/ppc/testing/instr_stvr.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_stvr.s rename to src/xenia/cpu/ppc/testing/instr_stvr.s diff --git a/src/xenia/cpu/frontend/testing/instr_subf.s b/src/xenia/cpu/ppc/testing/instr_subf.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_subf.s rename to src/xenia/cpu/ppc/testing/instr_subf.s diff --git a/src/xenia/cpu/frontend/testing/instr_subfc.s b/src/xenia/cpu/ppc/testing/instr_subfc.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_subfc.s rename to src/xenia/cpu/ppc/testing/instr_subfc.s diff --git a/src/xenia/cpu/frontend/testing/instr_subfe.s b/src/xenia/cpu/ppc/testing/instr_subfe.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_subfe.s rename to src/xenia/cpu/ppc/testing/instr_subfe.s diff --git a/src/xenia/cpu/frontend/testing/instr_subfic.s b/src/xenia/cpu/ppc/testing/instr_subfic.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_subfic.s rename to src/xenia/cpu/ppc/testing/instr_subfic.s diff --git a/src/xenia/cpu/frontend/testing/instr_subfme.s b/src/xenia/cpu/ppc/testing/instr_subfme.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_subfme.s rename to src/xenia/cpu/ppc/testing/instr_subfme.s diff --git a/src/xenia/cpu/frontend/testing/instr_subfze.s b/src/xenia/cpu/ppc/testing/instr_subfze.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_subfze.s rename to src/xenia/cpu/ppc/testing/instr_subfze.s diff --git a/src/xenia/cpu/frontend/testing/instr_td.s b/src/xenia/cpu/ppc/testing/instr_td.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_td.s rename to src/xenia/cpu/ppc/testing/instr_td.s diff --git a/src/xenia/cpu/frontend/testing/instr_tdi.s b/src/xenia/cpu/ppc/testing/instr_tdi.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_tdi.s rename to src/xenia/cpu/ppc/testing/instr_tdi.s diff --git a/src/xenia/cpu/frontend/testing/instr_tw.s b/src/xenia/cpu/ppc/testing/instr_tw.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_tw.s rename to src/xenia/cpu/ppc/testing/instr_tw.s diff --git a/src/xenia/cpu/frontend/testing/instr_twi.s b/src/xenia/cpu/ppc/testing/instr_twi.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_twi.s rename to src/xenia/cpu/ppc/testing/instr_twi.s diff --git a/src/xenia/cpu/frontend/testing/instr_vaddfp.s b/src/xenia/cpu/ppc/testing/instr_vaddfp.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vaddfp.s rename to src/xenia/cpu/ppc/testing/instr_vaddfp.s diff --git a/src/xenia/cpu/frontend/testing/instr_vaddfp128.s b/src/xenia/cpu/ppc/testing/instr_vaddfp128.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vaddfp128.s rename to src/xenia/cpu/ppc/testing/instr_vaddfp128.s diff --git a/src/xenia/cpu/frontend/testing/instr_vaddshs.s b/src/xenia/cpu/ppc/testing/instr_vaddshs.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vaddshs.s rename to src/xenia/cpu/ppc/testing/instr_vaddshs.s diff --git a/src/xenia/cpu/frontend/testing/instr_vadduhm.s b/src/xenia/cpu/ppc/testing/instr_vadduhm.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vadduhm.s rename to src/xenia/cpu/ppc/testing/instr_vadduhm.s diff --git a/src/xenia/cpu/frontend/testing/instr_vand.s b/src/xenia/cpu/ppc/testing/instr_vand.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vand.s rename to src/xenia/cpu/ppc/testing/instr_vand.s diff --git a/src/xenia/cpu/frontend/testing/instr_vand128.s b/src/xenia/cpu/ppc/testing/instr_vand128.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vand128.s rename to src/xenia/cpu/ppc/testing/instr_vand128.s diff --git a/src/xenia/cpu/frontend/testing/instr_vandc.s b/src/xenia/cpu/ppc/testing/instr_vandc.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vandc.s rename to src/xenia/cpu/ppc/testing/instr_vandc.s diff --git a/src/xenia/cpu/frontend/testing/instr_vandc128.s b/src/xenia/cpu/ppc/testing/instr_vandc128.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vandc128.s rename to src/xenia/cpu/ppc/testing/instr_vandc128.s diff --git a/src/xenia/cpu/frontend/testing/instr_vavgsh.s b/src/xenia/cpu/ppc/testing/instr_vavgsh.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vavgsh.s rename to src/xenia/cpu/ppc/testing/instr_vavgsh.s diff --git a/src/xenia/cpu/frontend/testing/instr_vavguh.s b/src/xenia/cpu/ppc/testing/instr_vavguh.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vavguh.s rename to src/xenia/cpu/ppc/testing/instr_vavguh.s diff --git a/src/xenia/cpu/frontend/testing/instr_vcfsx.s b/src/xenia/cpu/ppc/testing/instr_vcfsx.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vcfsx.s rename to src/xenia/cpu/ppc/testing/instr_vcfsx.s diff --git a/src/xenia/cpu/frontend/testing/instr_vcmpxxfp.s b/src/xenia/cpu/ppc/testing/instr_vcmpxxfp.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vcmpxxfp.s rename to src/xenia/cpu/ppc/testing/instr_vcmpxxfp.s diff --git a/src/xenia/cpu/frontend/testing/instr_vcmpxxfp128.s b/src/xenia/cpu/ppc/testing/instr_vcmpxxfp128.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vcmpxxfp128.s rename to src/xenia/cpu/ppc/testing/instr_vcmpxxfp128.s diff --git a/src/xenia/cpu/frontend/testing/instr_vctsxs.s b/src/xenia/cpu/ppc/testing/instr_vctsxs.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vctsxs.s rename to src/xenia/cpu/ppc/testing/instr_vctsxs.s diff --git a/src/xenia/cpu/frontend/testing/instr_vexptefp.s b/src/xenia/cpu/ppc/testing/instr_vexptefp.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vexptefp.s rename to src/xenia/cpu/ppc/testing/instr_vexptefp.s diff --git a/src/xenia/cpu/frontend/testing/instr_vmaddfp.s b/src/xenia/cpu/ppc/testing/instr_vmaddfp.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vmaddfp.s rename to src/xenia/cpu/ppc/testing/instr_vmaddfp.s diff --git a/src/xenia/cpu/frontend/testing/instr_vmaxfp.s b/src/xenia/cpu/ppc/testing/instr_vmaxfp.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vmaxfp.s rename to src/xenia/cpu/ppc/testing/instr_vmaxfp.s diff --git a/src/xenia/cpu/frontend/testing/instr_vmaxfp128.s b/src/xenia/cpu/ppc/testing/instr_vmaxfp128.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vmaxfp128.s rename to src/xenia/cpu/ppc/testing/instr_vmaxfp128.s diff --git a/src/xenia/cpu/frontend/testing/instr_vmaxsh.s b/src/xenia/cpu/ppc/testing/instr_vmaxsh.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vmaxsh.s rename to src/xenia/cpu/ppc/testing/instr_vmaxsh.s diff --git a/src/xenia/cpu/frontend/testing/instr_vmaxuh.s b/src/xenia/cpu/ppc/testing/instr_vmaxuh.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vmaxuh.s rename to src/xenia/cpu/ppc/testing/instr_vmaxuh.s diff --git a/src/xenia/cpu/frontend/testing/instr_vminfp.s b/src/xenia/cpu/ppc/testing/instr_vminfp.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vminfp.s rename to src/xenia/cpu/ppc/testing/instr_vminfp.s diff --git a/src/xenia/cpu/frontend/testing/instr_vminfp128.s b/src/xenia/cpu/ppc/testing/instr_vminfp128.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vminfp128.s rename to src/xenia/cpu/ppc/testing/instr_vminfp128.s diff --git a/src/xenia/cpu/frontend/testing/instr_vminsh.s b/src/xenia/cpu/ppc/testing/instr_vminsh.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vminsh.s rename to src/xenia/cpu/ppc/testing/instr_vminsh.s diff --git a/src/xenia/cpu/frontend/testing/instr_vminuh.s b/src/xenia/cpu/ppc/testing/instr_vminuh.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vminuh.s rename to src/xenia/cpu/ppc/testing/instr_vminuh.s diff --git a/src/xenia/cpu/frontend/testing/instr_vmrghb.s b/src/xenia/cpu/ppc/testing/instr_vmrghb.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vmrghb.s rename to src/xenia/cpu/ppc/testing/instr_vmrghb.s diff --git a/src/xenia/cpu/frontend/testing/instr_vmrghh.s b/src/xenia/cpu/ppc/testing/instr_vmrghh.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vmrghh.s rename to src/xenia/cpu/ppc/testing/instr_vmrghh.s diff --git a/src/xenia/cpu/frontend/testing/instr_vmrghw.s b/src/xenia/cpu/ppc/testing/instr_vmrghw.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vmrghw.s rename to src/xenia/cpu/ppc/testing/instr_vmrghw.s diff --git a/src/xenia/cpu/frontend/testing/instr_vmrglb.s b/src/xenia/cpu/ppc/testing/instr_vmrglb.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vmrglb.s rename to src/xenia/cpu/ppc/testing/instr_vmrglb.s diff --git a/src/xenia/cpu/frontend/testing/instr_vmrglh.s b/src/xenia/cpu/ppc/testing/instr_vmrglh.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vmrglh.s rename to src/xenia/cpu/ppc/testing/instr_vmrglh.s diff --git a/src/xenia/cpu/frontend/testing/instr_vmrglw.s b/src/xenia/cpu/ppc/testing/instr_vmrglw.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vmrglw.s rename to src/xenia/cpu/ppc/testing/instr_vmrglw.s diff --git a/src/xenia/cpu/frontend/testing/instr_vmsum3fp128.s b/src/xenia/cpu/ppc/testing/instr_vmsum3fp128.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vmsum3fp128.s rename to src/xenia/cpu/ppc/testing/instr_vmsum3fp128.s diff --git a/src/xenia/cpu/frontend/testing/instr_vmsum4fp128.s b/src/xenia/cpu/ppc/testing/instr_vmsum4fp128.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vmsum4fp128.s rename to src/xenia/cpu/ppc/testing/instr_vmsum4fp128.s diff --git a/src/xenia/cpu/frontend/testing/instr_vor.s b/src/xenia/cpu/ppc/testing/instr_vor.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vor.s rename to src/xenia/cpu/ppc/testing/instr_vor.s diff --git a/src/xenia/cpu/frontend/testing/instr_vor128.s b/src/xenia/cpu/ppc/testing/instr_vor128.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vor128.s rename to src/xenia/cpu/ppc/testing/instr_vor128.s diff --git a/src/xenia/cpu/frontend/testing/instr_vperm.s b/src/xenia/cpu/ppc/testing/instr_vperm.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vperm.s rename to src/xenia/cpu/ppc/testing/instr_vperm.s diff --git a/src/xenia/cpu/frontend/testing/instr_vpermwi128.s b/src/xenia/cpu/ppc/testing/instr_vpermwi128.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vpermwi128.s rename to src/xenia/cpu/ppc/testing/instr_vpermwi128.s diff --git a/src/xenia/cpu/frontend/testing/instr_vpkd3d128.s b/src/xenia/cpu/ppc/testing/instr_vpkd3d128.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vpkd3d128.s rename to src/xenia/cpu/ppc/testing/instr_vpkd3d128.s diff --git a/src/xenia/cpu/frontend/testing/instr_vpkpx.s b/src/xenia/cpu/ppc/testing/instr_vpkpx.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vpkpx.s rename to src/xenia/cpu/ppc/testing/instr_vpkpx.s diff --git a/src/xenia/cpu/frontend/testing/instr_vpkshss.s b/src/xenia/cpu/ppc/testing/instr_vpkshss.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vpkshss.s rename to src/xenia/cpu/ppc/testing/instr_vpkshss.s diff --git a/src/xenia/cpu/frontend/testing/instr_vpkshss128.s b/src/xenia/cpu/ppc/testing/instr_vpkshss128.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vpkshss128.s rename to src/xenia/cpu/ppc/testing/instr_vpkshss128.s diff --git a/src/xenia/cpu/frontend/testing/instr_vpkshus.s b/src/xenia/cpu/ppc/testing/instr_vpkshus.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vpkshus.s rename to src/xenia/cpu/ppc/testing/instr_vpkshus.s diff --git a/src/xenia/cpu/frontend/testing/instr_vpkshus128.s b/src/xenia/cpu/ppc/testing/instr_vpkshus128.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vpkshus128.s rename to src/xenia/cpu/ppc/testing/instr_vpkshus128.s diff --git a/src/xenia/cpu/frontend/testing/instr_vpkswss.s b/src/xenia/cpu/ppc/testing/instr_vpkswss.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vpkswss.s rename to src/xenia/cpu/ppc/testing/instr_vpkswss.s diff --git a/src/xenia/cpu/frontend/testing/instr_vpkswss128.s b/src/xenia/cpu/ppc/testing/instr_vpkswss128.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vpkswss128.s rename to src/xenia/cpu/ppc/testing/instr_vpkswss128.s diff --git a/src/xenia/cpu/frontend/testing/instr_vpkswus.s b/src/xenia/cpu/ppc/testing/instr_vpkswus.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vpkswus.s rename to src/xenia/cpu/ppc/testing/instr_vpkswus.s diff --git a/src/xenia/cpu/frontend/testing/instr_vpkswus128.s b/src/xenia/cpu/ppc/testing/instr_vpkswus128.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vpkswus128.s rename to src/xenia/cpu/ppc/testing/instr_vpkswus128.s diff --git a/src/xenia/cpu/frontend/testing/instr_vpkuhum.s b/src/xenia/cpu/ppc/testing/instr_vpkuhum.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vpkuhum.s rename to src/xenia/cpu/ppc/testing/instr_vpkuhum.s diff --git a/src/xenia/cpu/frontend/testing/instr_vpkuhum128.s b/src/xenia/cpu/ppc/testing/instr_vpkuhum128.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vpkuhum128.s rename to src/xenia/cpu/ppc/testing/instr_vpkuhum128.s diff --git a/src/xenia/cpu/frontend/testing/instr_vpkuhus.s b/src/xenia/cpu/ppc/testing/instr_vpkuhus.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vpkuhus.s rename to src/xenia/cpu/ppc/testing/instr_vpkuhus.s diff --git a/src/xenia/cpu/frontend/testing/instr_vpkuhus128.s b/src/xenia/cpu/ppc/testing/instr_vpkuhus128.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vpkuhus128.s rename to src/xenia/cpu/ppc/testing/instr_vpkuhus128.s diff --git a/src/xenia/cpu/frontend/testing/instr_vpkuwum.s b/src/xenia/cpu/ppc/testing/instr_vpkuwum.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vpkuwum.s rename to src/xenia/cpu/ppc/testing/instr_vpkuwum.s diff --git a/src/xenia/cpu/frontend/testing/instr_vpkuwum128.s b/src/xenia/cpu/ppc/testing/instr_vpkuwum128.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vpkuwum128.s rename to src/xenia/cpu/ppc/testing/instr_vpkuwum128.s diff --git a/src/xenia/cpu/frontend/testing/instr_vpkuwus.s b/src/xenia/cpu/ppc/testing/instr_vpkuwus.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vpkuwus.s rename to src/xenia/cpu/ppc/testing/instr_vpkuwus.s diff --git a/src/xenia/cpu/frontend/testing/instr_vpkuwus128.s b/src/xenia/cpu/ppc/testing/instr_vpkuwus128.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vpkuwus128.s rename to src/xenia/cpu/ppc/testing/instr_vpkuwus128.s diff --git a/src/xenia/cpu/frontend/testing/instr_vrfin.s b/src/xenia/cpu/ppc/testing/instr_vrfin.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vrfin.s rename to src/xenia/cpu/ppc/testing/instr_vrfin.s diff --git a/src/xenia/cpu/frontend/testing/instr_vrlh.s b/src/xenia/cpu/ppc/testing/instr_vrlh.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vrlh.s rename to src/xenia/cpu/ppc/testing/instr_vrlh.s diff --git a/src/xenia/cpu/frontend/testing/instr_vrlimi128.s b/src/xenia/cpu/ppc/testing/instr_vrlimi128.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vrlimi128.s rename to src/xenia/cpu/ppc/testing/instr_vrlimi128.s diff --git a/src/xenia/cpu/frontend/testing/instr_vsel.s b/src/xenia/cpu/ppc/testing/instr_vsel.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vsel.s rename to src/xenia/cpu/ppc/testing/instr_vsel.s diff --git a/src/xenia/cpu/frontend/testing/instr_vsl.s b/src/xenia/cpu/ppc/testing/instr_vsl.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vsl.s rename to src/xenia/cpu/ppc/testing/instr_vsl.s diff --git a/src/xenia/cpu/frontend/testing/instr_vslb.s b/src/xenia/cpu/ppc/testing/instr_vslb.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vslb.s rename to src/xenia/cpu/ppc/testing/instr_vslb.s diff --git a/src/xenia/cpu/frontend/testing/instr_vsldoi.s b/src/xenia/cpu/ppc/testing/instr_vsldoi.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vsldoi.s rename to src/xenia/cpu/ppc/testing/instr_vsldoi.s diff --git a/src/xenia/cpu/frontend/testing/instr_vslh.s b/src/xenia/cpu/ppc/testing/instr_vslh.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vslh.s rename to src/xenia/cpu/ppc/testing/instr_vslh.s diff --git a/src/xenia/cpu/frontend/testing/instr_vslo.s b/src/xenia/cpu/ppc/testing/instr_vslo.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vslo.s rename to src/xenia/cpu/ppc/testing/instr_vslo.s diff --git a/src/xenia/cpu/frontend/testing/instr_vslw.s b/src/xenia/cpu/ppc/testing/instr_vslw.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vslw.s rename to src/xenia/cpu/ppc/testing/instr_vslw.s diff --git a/src/xenia/cpu/frontend/testing/instr_vspltb.s b/src/xenia/cpu/ppc/testing/instr_vspltb.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vspltb.s rename to src/xenia/cpu/ppc/testing/instr_vspltb.s diff --git a/src/xenia/cpu/frontend/testing/instr_vsplth.s b/src/xenia/cpu/ppc/testing/instr_vsplth.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vsplth.s rename to src/xenia/cpu/ppc/testing/instr_vsplth.s diff --git a/src/xenia/cpu/frontend/testing/instr_vspltisb.s b/src/xenia/cpu/ppc/testing/instr_vspltisb.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vspltisb.s rename to src/xenia/cpu/ppc/testing/instr_vspltisb.s diff --git a/src/xenia/cpu/frontend/testing/instr_vspltish.s b/src/xenia/cpu/ppc/testing/instr_vspltish.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vspltish.s rename to src/xenia/cpu/ppc/testing/instr_vspltish.s diff --git a/src/xenia/cpu/frontend/testing/instr_vspltisw.s b/src/xenia/cpu/ppc/testing/instr_vspltisw.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vspltisw.s rename to src/xenia/cpu/ppc/testing/instr_vspltisw.s diff --git a/src/xenia/cpu/frontend/testing/instr_vspltw.s b/src/xenia/cpu/ppc/testing/instr_vspltw.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vspltw.s rename to src/xenia/cpu/ppc/testing/instr_vspltw.s diff --git a/src/xenia/cpu/frontend/testing/instr_vsr.s b/src/xenia/cpu/ppc/testing/instr_vsr.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vsr.s rename to src/xenia/cpu/ppc/testing/instr_vsr.s diff --git a/src/xenia/cpu/frontend/testing/instr_vsrah.s b/src/xenia/cpu/ppc/testing/instr_vsrah.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vsrah.s rename to src/xenia/cpu/ppc/testing/instr_vsrah.s diff --git a/src/xenia/cpu/frontend/testing/instr_vsrh.s b/src/xenia/cpu/ppc/testing/instr_vsrh.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vsrh.s rename to src/xenia/cpu/ppc/testing/instr_vsrh.s diff --git a/src/xenia/cpu/frontend/testing/instr_vsro.s b/src/xenia/cpu/ppc/testing/instr_vsro.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vsro.s rename to src/xenia/cpu/ppc/testing/instr_vsro.s diff --git a/src/xenia/cpu/frontend/testing/instr_vsubfp.s b/src/xenia/cpu/ppc/testing/instr_vsubfp.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vsubfp.s rename to src/xenia/cpu/ppc/testing/instr_vsubfp.s diff --git a/src/xenia/cpu/frontend/testing/instr_vsubfp128.s b/src/xenia/cpu/ppc/testing/instr_vsubfp128.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vsubfp128.s rename to src/xenia/cpu/ppc/testing/instr_vsubfp128.s diff --git a/src/xenia/cpu/frontend/testing/instr_vsubshs.s b/src/xenia/cpu/ppc/testing/instr_vsubshs.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vsubshs.s rename to src/xenia/cpu/ppc/testing/instr_vsubshs.s diff --git a/src/xenia/cpu/frontend/testing/instr_vsubuhm.s b/src/xenia/cpu/ppc/testing/instr_vsubuhm.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vsubuhm.s rename to src/xenia/cpu/ppc/testing/instr_vsubuhm.s diff --git a/src/xenia/cpu/frontend/testing/instr_vupkd3d128.s b/src/xenia/cpu/ppc/testing/instr_vupkd3d128.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vupkd3d128.s rename to src/xenia/cpu/ppc/testing/instr_vupkd3d128.s diff --git a/src/xenia/cpu/frontend/testing/instr_vupkhsb.s b/src/xenia/cpu/ppc/testing/instr_vupkhsb.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vupkhsb.s rename to src/xenia/cpu/ppc/testing/instr_vupkhsb.s diff --git a/src/xenia/cpu/frontend/testing/instr_vupkhsb128.s b/src/xenia/cpu/ppc/testing/instr_vupkhsb128.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vupkhsb128.s rename to src/xenia/cpu/ppc/testing/instr_vupkhsb128.s diff --git a/src/xenia/cpu/frontend/testing/instr_vupkhsh.s b/src/xenia/cpu/ppc/testing/instr_vupkhsh.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vupkhsh.s rename to src/xenia/cpu/ppc/testing/instr_vupkhsh.s diff --git a/src/xenia/cpu/frontend/testing/instr_vupklsb.s b/src/xenia/cpu/ppc/testing/instr_vupklsb.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vupklsb.s rename to src/xenia/cpu/ppc/testing/instr_vupklsb.s diff --git a/src/xenia/cpu/frontend/testing/instr_vupklsb128.s b/src/xenia/cpu/ppc/testing/instr_vupklsb128.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vupklsb128.s rename to src/xenia/cpu/ppc/testing/instr_vupklsb128.s diff --git a/src/xenia/cpu/frontend/testing/instr_vupklsh.s b/src/xenia/cpu/ppc/testing/instr_vupklsh.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vupklsh.s rename to src/xenia/cpu/ppc/testing/instr_vupklsh.s diff --git a/src/xenia/cpu/frontend/testing/instr_vxor.s b/src/xenia/cpu/ppc/testing/instr_vxor.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vxor.s rename to src/xenia/cpu/ppc/testing/instr_vxor.s diff --git a/src/xenia/cpu/frontend/testing/instr_vxor128.s b/src/xenia/cpu/ppc/testing/instr_vxor128.s similarity index 100% rename from src/xenia/cpu/frontend/testing/instr_vxor128.s rename to src/xenia/cpu/ppc/testing/instr_vxor128.s diff --git a/src/xenia/cpu/frontend/testing/jumptable_constants.s b/src/xenia/cpu/ppc/testing/jumptable_constants.s similarity index 100% rename from src/xenia/cpu/frontend/testing/jumptable_constants.s rename to src/xenia/cpu/ppc/testing/jumptable_constants.s diff --git a/src/xenia/cpu/frontend/testing/ppc_testing_main.cc b/src/xenia/cpu/ppc/testing/ppc_testing_main.cc similarity index 98% rename from src/xenia/cpu/frontend/testing/ppc_testing_main.cc rename to src/xenia/cpu/ppc/testing/ppc_testing_main.cc index ab814a1ae..c3c56cd6b 100644 --- a/src/xenia/cpu/frontend/testing/ppc_testing_main.cc +++ b/src/xenia/cpu/ppc/testing/ppc_testing_main.cc @@ -15,8 +15,8 @@ #include "xenia/base/math.h" #include "xenia/base/platform.h" #include "xenia/cpu/backend/x64/x64_backend.h" -#include "xenia/cpu/frontend/ppc_context.h" -#include "xenia/cpu/frontend/ppc_frontend.h" +#include "xenia/cpu/ppc/ppc_context.h" +#include "xenia/cpu/ppc/ppc_frontend.h" #include "xenia/cpu/processor.h" #include "xenia/cpu/raw_module.h" @@ -24,16 +24,16 @@ #include "xenia/base/platform_win.h" #endif // XE_COMPILER_MSVC -DEFINE_string(test_path, "src/xenia/cpu/frontend/testing/", +DEFINE_string(test_path, "src/xenia/cpu/ppc/testing/", "Directory scanned for test files."); -DEFINE_string(test_bin_path, "src/xenia/cpu/frontend/testing/bin/", +DEFINE_string(test_bin_path, "src/xenia/cpu/ppc/testing/bin/", "Directory with binary outputs of the test files."); namespace xe { namespace cpu { namespace test { -using xe::cpu::frontend::PPCContext; +using xe::cpu::ppc::PPCContext; typedef std::vector> AnnotationList; diff --git a/src/xenia/cpu/frontend/testing/premake5.lua b/src/xenia/cpu/ppc/testing/premake5.lua similarity index 95% rename from src/xenia/cpu/frontend/testing/premake5.lua rename to src/xenia/cpu/ppc/testing/premake5.lua index 74f0a39fc..5fac37f2d 100644 --- a/src/xenia/cpu/frontend/testing/premake5.lua +++ b/src/xenia/cpu/ppc/testing/premake5.lua @@ -2,7 +2,7 @@ project_root = "../../../../.." include(project_root.."/build_tools") group("tests") -project("xenia-cpu-frontend-tests") +project("xenia-cpu-ppc-tests") uuid("2a57d5ac-4024-4c49-9cd3-aa3a603c2ef8") kind("ConsoleApp") language("C++") diff --git a/src/xenia/cpu/frontend/testing/sequence_branch_carry.s b/src/xenia/cpu/ppc/testing/sequence_branch_carry.s similarity index 100% rename from src/xenia/cpu/frontend/testing/sequence_branch_carry.s rename to src/xenia/cpu/ppc/testing/sequence_branch_carry.s diff --git a/src/xenia/cpu/premake5.lua b/src/xenia/cpu/premake5.lua index 15f6a00a2..92249d632 100644 --- a/src/xenia/cpu/premake5.lua +++ b/src/xenia/cpu/premake5.lua @@ -17,8 +17,8 @@ project("xenia-cpu") local_platform_files("backend") local_platform_files("compiler") local_platform_files("compiler/passes") - local_platform_files("frontend") local_platform_files("hir") + local_platform_files("ppc") include("testing") -include("frontend/testing") +include("ppc/testing") diff --git a/src/xenia/cpu/processor.cc b/src/xenia/cpu/processor.cc index b0e578ba6..25230bcd8 100644 --- a/src/xenia/cpu/processor.cc +++ b/src/xenia/cpu/processor.cc @@ -19,8 +19,8 @@ #include "xenia/base/profiling.h" #include "xenia/cpu/cpu_flags.h" #include "xenia/cpu/export_resolver.h" -#include "xenia/cpu/frontend/ppc_frontend.h" #include "xenia/cpu/module.h" +#include "xenia/cpu/ppc/ppc_frontend.h" #include "xenia/cpu/stack_walker.h" #include "xenia/cpu/thread_state.h" #include "xenia/cpu/xex_module.h" @@ -32,8 +32,6 @@ namespace xe { namespace cpu { -using PPCContext = xe::cpu::frontend::PPCContext; - class BuiltinModule : public Module { public: explicit BuiltinModule(Processor* processor) @@ -72,7 +70,7 @@ bool Processor::Setup() { // TODO(benvanik): query mode from debugger? debug_info_flags_ = 0; - auto frontend = std::make_unique(this); + auto frontend = std::make_unique(this); // TODO(benvanik): set options/etc. // Must be initialized by subclass before calling into this. @@ -293,7 +291,7 @@ bool Processor::Execute(ThreadState* thread_state, uint32_t address) { return false; } - PPCContext* context = thread_state->context(); + auto context = thread_state->context(); // Pad out stack a bit, as some games seem to overwrite the caller by about // 16 to 32b. @@ -317,7 +315,7 @@ uint64_t Processor::Execute(ThreadState* thread_state, uint32_t address, uint64_t args[], size_t arg_count) { SCOPE_profile_cpu_f("cpu"); - PPCContext* context = thread_state->context(); + auto context = thread_state->context(); for (size_t i = 0; i < std::min(arg_count, 8ull); ++i) { context->r[3 + i] = args[i]; } @@ -349,7 +347,7 @@ uint64_t Processor::ExecuteInterrupt(ThreadState* thread_state, // disabled) or if any other interrupt is executing. auto global_lock = global_critical_region_.Acquire(); - PPCContext* context = thread_state->context(); + auto context = thread_state->context(); assert_true(arg_count <= 5); for (size_t i = 0; i < arg_count; ++i) { context->r[3 + i] = args[i]; diff --git a/src/xenia/cpu/processor.h b/src/xenia/cpu/processor.h index 17bb321bc..c4ba2f83e 100644 --- a/src/xenia/cpu/processor.h +++ b/src/xenia/cpu/processor.h @@ -18,9 +18,9 @@ #include "xenia/cpu/backend/backend.h" #include "xenia/cpu/entry_table.h" #include "xenia/cpu/export_resolver.h" -#include "xenia/cpu/frontend/ppc_frontend.h" #include "xenia/cpu/function.h" #include "xenia/cpu/module.h" +#include "xenia/cpu/ppc/ppc_frontend.h" #include "xenia/cpu/thread_state.h" #include "xenia/memory.h" @@ -53,7 +53,7 @@ class Processor { Memory* memory() const { return memory_; } debug::Debugger* debugger() const { return debugger_; } StackWalker* stack_walker() const { return stack_walker_.get(); } - frontend::PPCFrontend* frontend() const { return frontend_.get(); } + ppc::PPCFrontend* frontend() const { return frontend_.get(); } backend::Backend* backend() const { return backend_.get(); } ExportResolver* export_resolver() const { return export_resolver_; } @@ -98,7 +98,7 @@ class Processor { uint32_t debug_info_flags_ = 0; - std::unique_ptr frontend_; + std::unique_ptr frontend_; std::unique_ptr backend_; ExportResolver* export_resolver_ = nullptr; diff --git a/src/xenia/cpu/testing/add_test.cc b/src/xenia/cpu/testing/add_test.cc index f0a43d4bb..425ad9723 100644 --- a/src/xenia/cpu/testing/add_test.cc +++ b/src/xenia/cpu/testing/add_test.cc @@ -14,7 +14,7 @@ using namespace xe::cpu::hir; using namespace xe::cpu; using namespace xe::cpu::testing; -using xe::cpu::frontend::PPCContext; +using xe::cpu::ppc::PPCContext; TEST_CASE("ADD_I8", "[instr]") { TestFunction test([](HIRBuilder& b) { diff --git a/src/xenia/cpu/testing/byte_swap_test.cc b/src/xenia/cpu/testing/byte_swap_test.cc index 4a51961ea..ffe9e2ac7 100644 --- a/src/xenia/cpu/testing/byte_swap_test.cc +++ b/src/xenia/cpu/testing/byte_swap_test.cc @@ -13,7 +13,7 @@ using namespace xe; using namespace xe::cpu; using namespace xe::cpu::hir; using namespace xe::cpu::testing; -using xe::cpu::frontend::PPCContext; +using xe::cpu::ppc::PPCContext; TEST_CASE("BYTE_SWAP_V128", "[instr]") { TestFunction([](HIRBuilder& b) { diff --git a/src/xenia/cpu/testing/extract_test.cc b/src/xenia/cpu/testing/extract_test.cc index 94c1017a4..1dd1318e9 100644 --- a/src/xenia/cpu/testing/extract_test.cc +++ b/src/xenia/cpu/testing/extract_test.cc @@ -15,7 +15,7 @@ using namespace xe; using namespace xe::cpu; using namespace xe::cpu::hir; using namespace xe::cpu::testing; -using xe::cpu::frontend::PPCContext; +using xe::cpu::ppc::PPCContext; TEST_CASE("EXTRACT_INT8", "[instr]") { TestFunction test([](HIRBuilder& b) { diff --git a/src/xenia/cpu/testing/insert_test.cc b/src/xenia/cpu/testing/insert_test.cc index 8f0d7f904..569608289 100644 --- a/src/xenia/cpu/testing/insert_test.cc +++ b/src/xenia/cpu/testing/insert_test.cc @@ -15,7 +15,7 @@ using namespace xe; using namespace xe::cpu; using namespace xe::cpu::hir; using namespace xe::cpu::testing; -using xe::cpu::frontend::PPCContext; +using xe::cpu::ppc::PPCContext; TEST_CASE("INSERT_INT8", "[instr]") { for (int i = 0; i < 16; ++i) { diff --git a/src/xenia/cpu/testing/load_vector_shl_shr_test.cc b/src/xenia/cpu/testing/load_vector_shl_shr_test.cc index 80dd08b75..d982083c8 100644 --- a/src/xenia/cpu/testing/load_vector_shl_shr_test.cc +++ b/src/xenia/cpu/testing/load_vector_shl_shr_test.cc @@ -13,7 +13,7 @@ using namespace xe; using namespace xe::cpu; using namespace xe::cpu::hir; using namespace xe::cpu::testing; -using xe::cpu::frontend::PPCContext; +using xe::cpu::ppc::PPCContext; TEST_CASE("LOAD_VECTOR_SHL", "[instr]") { TestFunction test([](HIRBuilder& b) { diff --git a/src/xenia/cpu/testing/pack_test.cc b/src/xenia/cpu/testing/pack_test.cc index f7f3bfd4a..915272128 100644 --- a/src/xenia/cpu/testing/pack_test.cc +++ b/src/xenia/cpu/testing/pack_test.cc @@ -13,7 +13,7 @@ using namespace xe; using namespace xe::cpu; using namespace xe::cpu::hir; using namespace xe::cpu::testing; -using xe::cpu::frontend::PPCContext; +using xe::cpu::ppc::PPCContext; TEST_CASE("PACK_D3DCOLOR", "[instr]") { TestFunction test([](HIRBuilder& b) { diff --git a/src/xenia/cpu/testing/permute_test.cc b/src/xenia/cpu/testing/permute_test.cc index 6c9ee6ecc..df2afc8fd 100644 --- a/src/xenia/cpu/testing/permute_test.cc +++ b/src/xenia/cpu/testing/permute_test.cc @@ -13,7 +13,7 @@ using namespace xe; using namespace xe::cpu; using namespace xe::cpu::hir; using namespace xe::cpu::testing; -using xe::cpu::frontend::PPCContext; +using xe::cpu::ppc::PPCContext; TEST_CASE("PERMUTE_V128_BY_INT32_CONSTANT", "[instr]") { { diff --git a/src/xenia/cpu/testing/sandbox_main.cc b/src/xenia/cpu/testing/sandbox_main.cc index a6d8d20fc..28596e7a0 100644 --- a/src/xenia/cpu/testing/sandbox_main.cc +++ b/src/xenia/cpu/testing/sandbox_main.cc @@ -10,8 +10,8 @@ #include "xenia/base/main.h" #include "xenia/cpu/backend/x64/x64_backend.h" #include "xenia/cpu/cpu.h" -#include "xenia/cpu/frontend/ppc_context.h" -#include "xenia/cpu/frontend/ppc_frontend.h" +#include "xenia/cpu/ppc/ppc_context.h" +#include "xenia/cpu/ppc/ppc_frontend.h" #include "xenia/cpu/raw_module.h" #include @@ -20,7 +20,7 @@ namespace xe { namespace cpu { namespace sandbox { -using xe::cpu::frontend::PPCContext; +using xe::cpu::ppc::PPCContext; using xe::cpu::Runtime; // TODO(benvanik): simple memory? move more into core? diff --git a/src/xenia/cpu/testing/sha_test.cc b/src/xenia/cpu/testing/sha_test.cc index 57aae27d4..4382597b5 100644 --- a/src/xenia/cpu/testing/sha_test.cc +++ b/src/xenia/cpu/testing/sha_test.cc @@ -12,7 +12,7 @@ using namespace xe::cpu::hir; using namespace xe::cpu; using namespace xe::cpu::testing; -using xe::cpu::frontend::PPCContext; +using xe::cpu::ppc::PPCContext; TEST_CASE("SHA_I8", "[instr]") { TestFunction test([](HIRBuilder& b) { diff --git a/src/xenia/cpu/testing/shl_test.cc b/src/xenia/cpu/testing/shl_test.cc index 7fc458b75..d42ba6d26 100644 --- a/src/xenia/cpu/testing/shl_test.cc +++ b/src/xenia/cpu/testing/shl_test.cc @@ -12,7 +12,7 @@ using namespace xe::cpu::hir; using namespace xe::cpu; using namespace xe::cpu::testing; -using xe::cpu::frontend::PPCContext; +using xe::cpu::ppc::PPCContext; TEST_CASE("SHL_I8", "[instr]") { TestFunction test([](HIRBuilder& b) { diff --git a/src/xenia/cpu/testing/shr_test.cc b/src/xenia/cpu/testing/shr_test.cc index f02e8e6e0..c90ef2005 100644 --- a/src/xenia/cpu/testing/shr_test.cc +++ b/src/xenia/cpu/testing/shr_test.cc @@ -13,7 +13,7 @@ using namespace xe; using namespace xe::cpu; using namespace xe::cpu::hir; using namespace xe::cpu::testing; -using xe::cpu::frontend::PPCContext; +using xe::cpu::ppc::PPCContext; TEST_CASE("SHR_I8", "[instr]") { TestFunction test([](HIRBuilder& b) { diff --git a/src/xenia/cpu/testing/swizzle_test.cc b/src/xenia/cpu/testing/swizzle_test.cc index 4245fdbf0..1512c1d22 100644 --- a/src/xenia/cpu/testing/swizzle_test.cc +++ b/src/xenia/cpu/testing/swizzle_test.cc @@ -13,7 +13,7 @@ using namespace xe; using namespace xe::cpu; using namespace xe::cpu::hir; using namespace xe::cpu::testing; -using xe::cpu::frontend::PPCContext; +using xe::cpu::ppc::PPCContext; TEST_CASE("SWIZZLE_V128", "[instr]") { TestFunction([](HIRBuilder& b) { diff --git a/src/xenia/cpu/testing/unpack_test.cc b/src/xenia/cpu/testing/unpack_test.cc index 2e1f04671..284d7e76c 100644 --- a/src/xenia/cpu/testing/unpack_test.cc +++ b/src/xenia/cpu/testing/unpack_test.cc @@ -13,7 +13,7 @@ using namespace xe; using namespace xe::cpu; using namespace xe::cpu::hir; using namespace xe::cpu::testing; -using xe::cpu::frontend::PPCContext; +using xe::cpu::ppc::PPCContext; TEST_CASE("UNPACK_D3DCOLOR", "[instr]") { TestFunction test([](HIRBuilder& b) { diff --git a/src/xenia/cpu/testing/util.h b/src/xenia/cpu/testing/util.h index efe51842b..561c33010 100644 --- a/src/xenia/cpu/testing/util.h +++ b/src/xenia/cpu/testing/util.h @@ -14,9 +14,9 @@ #include "xenia/base/main.h" #include "xenia/cpu/backend/x64/x64_backend.h" -#include "xenia/cpu/frontend/ppc_context.h" -#include "xenia/cpu/frontend/ppc_frontend.h" #include "xenia/cpu/hir/hir_builder.h" +#include "xenia/cpu/ppc/ppc_context.h" +#include "xenia/cpu/ppc/ppc_frontend.h" #include "xenia/cpu/processor.h" #include "xenia/cpu/test_module.h" @@ -28,7 +28,7 @@ namespace xe { namespace cpu { namespace testing { -using xe::cpu::frontend::PPCContext; +using xe::cpu::ppc::PPCContext; class TestFunction { public: diff --git a/src/xenia/cpu/testing/vector_add_test.cc b/src/xenia/cpu/testing/vector_add_test.cc index 6e0cc50e2..26e4e9877 100644 --- a/src/xenia/cpu/testing/vector_add_test.cc +++ b/src/xenia/cpu/testing/vector_add_test.cc @@ -15,7 +15,7 @@ using namespace xe; using namespace xe::cpu; using namespace xe::cpu::hir; using namespace xe::cpu::testing; -using xe::cpu::frontend::PPCContext; +using xe::cpu::ppc::PPCContext; TEST_CASE("VECTOR_ADD_I8", "[instr]") { TestFunction test([](HIRBuilder& b) { diff --git a/src/xenia/cpu/testing/vector_max_test.cc b/src/xenia/cpu/testing/vector_max_test.cc index 13c44d894..3b4bcd66c 100644 --- a/src/xenia/cpu/testing/vector_max_test.cc +++ b/src/xenia/cpu/testing/vector_max_test.cc @@ -15,7 +15,7 @@ using namespace xe; using namespace xe::cpu; using namespace xe::cpu::hir; using namespace xe::cpu::testing; -using xe::cpu::frontend::PPCContext; +using xe::cpu::ppc::PPCContext; TEST_CASE("VECTOR_MAX_I8_SIGNED", "[instr]") { TestFunction test([](HIRBuilder& b) { diff --git a/src/xenia/cpu/testing/vector_min_test.cc b/src/xenia/cpu/testing/vector_min_test.cc index 36e3eef9c..3d2b77190 100644 --- a/src/xenia/cpu/testing/vector_min_test.cc +++ b/src/xenia/cpu/testing/vector_min_test.cc @@ -15,7 +15,7 @@ using namespace xe; using namespace xe::cpu; using namespace xe::cpu::hir; using namespace xe::cpu::testing; -using xe::cpu::frontend::PPCContext; +using xe::cpu::ppc::PPCContext; TEST_CASE("VECTOR_MIN_I8_SIGNED", "[instr]") { TestFunction test([](HIRBuilder& b) { diff --git a/src/xenia/cpu/testing/vector_rotate_left_test.cc b/src/xenia/cpu/testing/vector_rotate_left_test.cc index 9d011c8b1..406caa157 100644 --- a/src/xenia/cpu/testing/vector_rotate_left_test.cc +++ b/src/xenia/cpu/testing/vector_rotate_left_test.cc @@ -14,7 +14,7 @@ using namespace xe; using namespace xe::cpu; using namespace xe::cpu::hir; using namespace xe::cpu::testing; -using xe::cpu::frontend::PPCContext; +using xe::cpu::ppc::PPCContext; TEST_CASE("VECTOR_ROTATE_LEFT_I8", "[instr]") { TestFunction test([](HIRBuilder& b) { diff --git a/src/xenia/cpu/testing/vector_sha_test.cc b/src/xenia/cpu/testing/vector_sha_test.cc index 638ac3d6d..fe891ce98 100644 --- a/src/xenia/cpu/testing/vector_sha_test.cc +++ b/src/xenia/cpu/testing/vector_sha_test.cc @@ -13,7 +13,7 @@ using namespace xe; using namespace xe::cpu; using namespace xe::cpu::hir; using namespace xe::cpu::testing; -using xe::cpu::frontend::PPCContext; +using xe::cpu::ppc::PPCContext; TEST_CASE("VECTOR_SHA_I8", "[instr]") { TestFunction test([](HIRBuilder& b) { diff --git a/src/xenia/cpu/testing/vector_shl_test.cc b/src/xenia/cpu/testing/vector_shl_test.cc index 5861e8343..663c961a6 100644 --- a/src/xenia/cpu/testing/vector_shl_test.cc +++ b/src/xenia/cpu/testing/vector_shl_test.cc @@ -13,7 +13,7 @@ using namespace xe; using namespace xe::cpu; using namespace xe::cpu::hir; using namespace xe::cpu::testing; -using xe::cpu::frontend::PPCContext; +using xe::cpu::ppc::PPCContext; TEST_CASE("VECTOR_SHL_I8", "[instr]") { TestFunction test([](HIRBuilder& b) { diff --git a/src/xenia/cpu/testing/vector_shr_test.cc b/src/xenia/cpu/testing/vector_shr_test.cc index a513eb74f..0cb1947b7 100644 --- a/src/xenia/cpu/testing/vector_shr_test.cc +++ b/src/xenia/cpu/testing/vector_shr_test.cc @@ -13,7 +13,7 @@ using namespace xe; using namespace xe::cpu; using namespace xe::cpu::hir; using namespace xe::cpu::testing; -using xe::cpu::frontend::PPCContext; +using xe::cpu::ppc::PPCContext; TEST_CASE("VECTOR_SHR_I8", "[instr]") { TestFunction test([](HIRBuilder& b) { diff --git a/src/xenia/cpu/thread_state.cc b/src/xenia/cpu/thread_state.cc index 7c19d6053..884ee08e4 100644 --- a/src/xenia/cpu/thread_state.cc +++ b/src/xenia/cpu/thread_state.cc @@ -23,8 +23,6 @@ namespace xe { namespace cpu { -using PPCContext = xe::cpu::frontend::PPCContext; - thread_local ThreadState* thread_state_ = nullptr; ThreadState::ThreadState(Processor* processor, uint32_t thread_id, @@ -85,9 +83,9 @@ ThreadState::ThreadState(Processor* processor, uint32_t thread_id, assert_not_zero(stack_address_); // Allocate with 64b alignment. - context_ = memory::AlignedAlloc(64); + context_ = memory::AlignedAlloc(64); assert_true(((uint64_t)context_ & 0x3F) == 0); - std::memset(context_, 0, sizeof(PPCContext)); + std::memset(context_, 0, sizeof(ppc::PPCContext)); // Stash pointers to common structures that callbacks may need. context_->global_mutex = &xe::global_critical_region::mutex(); diff --git a/src/xenia/cpu/thread_state.h b/src/xenia/cpu/thread_state.h index a1ceaccb5..9e094b816 100644 --- a/src/xenia/cpu/thread_state.h +++ b/src/xenia/cpu/thread_state.h @@ -12,7 +12,7 @@ #include -#include "xenia/cpu/frontend/ppc_context.h" +#include "xenia/cpu/ppc/ppc_context.h" #include "xenia/cpu/thread_state.h" #include "xenia/memory.h" @@ -45,7 +45,7 @@ class ThreadState { uint32_t stack_base() const { return stack_base_; } uint32_t stack_limit() const { return stack_limit_; } uint32_t pcr_address() const { return pcr_address_; } - xe::cpu::frontend::PPCContext* context() const { return context_; } + ppc::PPCContext* context() const { return context_; } static void Bind(ThreadState* thread_state); static ThreadState* Get(); @@ -66,7 +66,7 @@ class ThreadState { uint32_t pcr_address_; // NOTE: must be 64b aligned for SSE ops. - xe::cpu::frontend::PPCContext* context_; + ppc::PPCContext* context_; }; } // namespace cpu diff --git a/src/xenia/cpu/xex_module.cc b/src/xenia/cpu/xex_module.cc index ba2a24184..4049560d1 100644 --- a/src/xenia/cpu/xex_module.cc +++ b/src/xenia/cpu/xex_module.cc @@ -26,10 +26,9 @@ namespace xe { namespace cpu { -using xe::cpu::frontend::PPCContext; using xe::kernel::KernelState; -void UndefinedImport(PPCContext* ppc_context, KernelState* kernel_state) { +void UndefinedImport(ppc::PPCContext* ppc_context, KernelState* kernel_state) { XELOGE("call to undefined import"); } diff --git a/src/xenia/debug/debugger.cc b/src/xenia/debug/debugger.cc index fb6ffe144..46523565a 100644 --- a/src/xenia/debug/debugger.cc +++ b/src/xenia/debug/debugger.cc @@ -22,8 +22,8 @@ #include "xenia/base/string.h" #include "xenia/base/threading.h" #include "xenia/cpu/backend/code_cache.h" -#include "xenia/cpu/frontend/ppc_instr.h" #include "xenia/cpu/function.h" +#include "xenia/cpu/ppc/ppc_instr.h" #include "xenia/cpu/processor.h" #include "xenia/cpu/stack_walker.h" #include "xenia/emulator.h" @@ -685,15 +685,15 @@ bool Debugger::OnUnhandledException(Exception* ex) { return true; } -bool TestPpcCondition(const xe::cpu::frontend::PPCContext* context, uint32_t bo, +bool TestPpcCondition(const xe::cpu::ppc::PPCContext* context, uint32_t bo, uint32_t bi, bool check_ctr, bool check_cond) { bool ctr_ok = true; if (check_ctr) { - if (xe::cpu::frontend::select_bits(bo, 2, 2)) { + if (xe::cpu::ppc::select_bits(bo, 2, 2)) { ctr_ok = true; } else { uint32_t new_ctr_value = static_cast(context->ctr - 1); - if (xe::cpu::frontend::select_bits(bo, 1, 1)) { + if (xe::cpu::ppc::select_bits(bo, 1, 1)) { ctr_ok = new_ctr_value == 0; } else { ctr_ok = new_ctr_value != 0; @@ -702,12 +702,12 @@ bool TestPpcCondition(const xe::cpu::frontend::PPCContext* context, uint32_t bo, } bool cond_ok = true; if (check_cond) { - if (xe::cpu::frontend::select_bits(bo, 4, 4)) { + if (xe::cpu::ppc::select_bits(bo, 4, 4)) { cond_ok = true; } else { uint8_t cr = *(reinterpret_cast(&context->cr0) + (4 * (bi >> 2)) + (bi & 3)); - if (xe::cpu::frontend::select_bits(bo, 3, 3)) { + if (xe::cpu::ppc::select_bits(bo, 3, 3)) { cond_ok = cr != 0; } else { cond_ok = cr == 0; @@ -719,11 +719,11 @@ bool TestPpcCondition(const xe::cpu::frontend::PPCContext* context, uint32_t bo, uint32_t Debugger::CalculateNextGuestInstruction( ThreadExecutionInfo* thread_info, uint32_t current_pc) { - xe::cpu::frontend::InstrData i; + xe::cpu::ppc::InstrData i; i.address = current_pc; i.code = xe::load_and_swap( emulator_->memory()->TranslateVirtual(i.address)); - i.type = xe::cpu::frontend::GetInstrType(i.code); + i.type = xe::cpu::ppc::GetInstrType(i.code); if (!i.type) { return current_pc + 4; } else if (i.code == 0x4E800020) { @@ -737,13 +737,13 @@ uint32_t Debugger::CalculateNextGuestInstruction( } else if (i.type->opcode == 0x48000000) { // b/ba/bl/bla uint32_t target_pc = - static_cast(xe::cpu::frontend::XEEXTS26(i.I.LI << 2)) + + static_cast(xe::cpu::ppc::XEEXTS26(i.I.LI << 2)) + (i.I.AA ? 0u : i.address); return target_pc; } else if (i.type->opcode == 0x40000000) { // bc/bca/bcl/bcla uint32_t target_pc = - static_cast(xe::cpu::frontend::XEEXTS16(i.B.BD << 2)) + + static_cast(xe::cpu::ppc::XEEXTS16(i.B.BD << 2)) + (i.B.AA ? 0u : i.address); bool test_passed = TestPpcCondition(&thread_info->guest_context, i.B.BO, i.B.BI, true, true); diff --git a/src/xenia/debug/debugger.h b/src/xenia/debug/debugger.h index 4269299eb..8b1a77a9a 100644 --- a/src/xenia/debug/debugger.h +++ b/src/xenia/debug/debugger.h @@ -98,7 +98,7 @@ struct ThreadExecutionInfo { // Last-sampled PPC context. // This is updated whenever the debugger stops. - xe::cpu::frontend::PPCContext guest_context; + xe::cpu::ppc::PPCContext guest_context; // Last-sampled host x64 context. // This is updated whenever the debugger stops and must be used instead of any // value taken from the StackWalker as it properly respects exception stacks. diff --git a/src/xenia/debug/ui/debug_window.cc b/src/xenia/debug/ui/debug_window.cc index 56c4c6cea..8ded22b76 100644 --- a/src/xenia/debug/ui/debug_window.cc +++ b/src/xenia/debug/ui/debug_window.cc @@ -26,7 +26,7 @@ #include "xenia/base/platform.h" #include "xenia/base/string_util.h" #include "xenia/base/threading.h" -#include "xenia/cpu/frontend/ppc_disasm.h" +#include "xenia/cpu/ppc/ppc_disasm.h" #include "xenia/cpu/stack_walker.h" #include "xenia/gpu/graphics_system.h" #include "xenia/kernel/xmodule.h" @@ -40,8 +40,6 @@ namespace xe { namespace debug { namespace ui { -using xe::cpu::frontend::PPCContext; -using xe::cpu::frontend::PPCRegister; using xe::kernel::XModule; using xe::kernel::XObject; using xe::kernel::XThread; @@ -519,11 +517,11 @@ void DebugWindow::DrawGuestFunctionSource() { ImGui::Text(" %c ", is_current_instr ? '>' : ' '); ImGui::SameLine(); - cpu::frontend::InstrData i; + cpu::ppc::InstrData i; i.address = address; i.code = xe::load_and_swap(memory->TranslateVirtual(address)); - i.type = cpu::frontend::GetInstrType(i.code); - cpu::frontend::DisasmPPC(&i, &str); + i.type = cpu::ppc::GetInstrType(i.code); + cpu::ppc::DisasmPPC(&i, &str); ImGui::Text("%.8X %.8X %s", address, i.code, str.GetString()); str.Reset(); diff --git a/src/xenia/kernel/util/shim_utils.h b/src/xenia/kernel/util/shim_utils.h index e7e647426..42b7b9070 100644 --- a/src/xenia/kernel/util/shim_utils.h +++ b/src/xenia/kernel/util/shim_utils.h @@ -19,7 +19,7 @@ #include "xenia/base/memory.h" #include "xenia/base/string_buffer.h" #include "xenia/cpu/export_resolver.h" -#include "xenia/cpu/frontend/ppc_context.h" +#include "xenia/cpu/ppc/ppc_context.h" #include "xenia/kernel/kernel_state.h" DECLARE_bool(log_high_frequency_kernel_calls); @@ -27,7 +27,7 @@ DECLARE_bool(log_high_frequency_kernel_calls); namespace xe { namespace kernel { -using PPCContext = xe::cpu::frontend::PPCContext; +using PPCContext = xe::cpu::ppc::PPCContext; #define SHIM_CALL void _cdecl #define SHIM_SET_MAPPING(library_name, export_name, shim_data) \ diff --git a/xenia-build b/xenia-build index fc4a6107f..3764337df 100755 --- a/xenia-build +++ b/xenia-build @@ -564,7 +564,7 @@ class TestCommand(BaseBuildCommand): # The test executables that will be built and run. test_targets = args['target'] or [ - 'xenia-cpu-frontend-tests', + 'xenia-cpu-ppc-tests', ] args['target'] = test_targets @@ -615,7 +615,7 @@ class GenTestsCommand(Command): name='gentests', help_short='Generates test binaries.', help_long=''' - Generates test binaries (under src/xenia/cpu/frontend/testing/bin/). + Generates test binaries (under src/xenia/cpu/ppc/testing/bin/). Run after modifying test .s files. ''', *args, **kwargs) @@ -630,7 +630,7 @@ class GenTestsCommand(Command): ppc_objdump = os.path.join(binutils_path, 'powerpc-none-elf-objdump') ppc_nm = os.path.join(binutils_path, 'powerpc-none-elf-nm') - test_src = os.path.join('src', 'xenia', 'cpu', 'frontend', 'testing') + test_src = os.path.join('src', 'xenia', 'cpu', 'ppc', 'testing') test_bin = os.path.join(test_src, 'bin') # Ensure the test output path exists.