feat!: rewrote program in a data oriented style.

This is because the source code is objected oriented which is not cpu cache
friendly, making the program slower than it has to be. Yuzu's entire
codebase is written in a objected oriented way and I wonder how much faster
it could if they had use DoD principles from the very beginning.

That's why I want to instill DoD fundamentals early on so this won't be a
problem going forward.

Signed-off-by: Ronald Caesar <github43132@proton.me>
This commit is contained in:
Ronald Caesar 2025-08-02 03:46:07 -04:00
parent 653b84c264
commit ba45834583
No known key found for this signature in database
GPG key ID: 04307C401999C596
26 changed files with 1179 additions and 1162 deletions

20
core/ARM/cpu.cpp Executable file
View file

@ -0,0 +1,20 @@
#include "cpu.h"
#include "JIT/jit.h"
void cpuTest()
{
CPU cpu;
cpu.pc = 0;
// Simple ARMv8 program in memory (MOVZ X0, #5; ADD X0, X0, #3; RET)
// These are placeholders; real encoding will be parsed later
cpu.write_byte(0, 0x05); // MOVZ placeholder
cpu.write_byte(4, 0x03); // ADD placeholder
cpu.write_byte(8, 0xFF); // RET placeholder
LOG_INFO(ARM, "{}", cpu.read_byte(0));
JIT jit;
//jit.translate_and_run(cpu);
cpu.print_debug_information();
}