aarch64: move cpu files to a new folder

The aarch64 folder will hold all cpu code from now on.

Signed-off-by: Ronald Caesar <github43132@proton.me>
This commit is contained in:
Ronald Caesar 2025-08-10 02:25:47 -04:00
parent b41e8b9d4f
commit 59e812bc63
No known key found for this signature in database
GPG key ID: 04307C401999C596
2 changed files with 33 additions and 7 deletions

View file

@ -1,5 +1,6 @@
#include "cpu.h"
#include "JIT/jit.h"
#include "isa.h"
#include "Base/Assert.h"
void cpuTest()
{
CPU cpu;
@ -12,9 +13,5 @@ void cpuTest()
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();
}
}

View file

@ -6,6 +6,35 @@
#include "Base/Logging/Log.h"
namespace aarch64
{
#define GPR_REGISTERS 32
#define ZERO_REGISTER_INDEX 31
#define FPR_REGISTERS 32
typedef struct
{
uint64_t gpr[GPR_REGISTERS];
unsigned __int128 fpr[FPR_REGISTERS];
uint64_t pc;
uint64_t sp;
} isa_t;
uint64_t read_X(uint64_t* registers, size_t n);
void adr(uint64_t* registers, size_t n, uint64_t pc, uint64_t offset);
//=========================================================
// Access Floating Point Registers
//=========================================================
uint8_t B(unsigned __int128 registers, size_t n);
uint16_t H(unsigned __int128 registers, size_t n);
uint32_t S(unsigned __int128 registers, size_t n);
uint64_t D(unsigned __int128 registers, size_t n);
unsigned __int128 Q(unsigned __int128 registers, size_t n);
} // namespace aarch64
struct CPU
{
u64 regs[31] = {0}; // X0X30