mirror of
https://github.com/pound-emu/pound.git
synced 2025-12-12 10:37:00 +00:00
Add the first files (ARMv8 basic emu)
This commit is contained in:
parent
304d94e955
commit
3f2d75276c
5 changed files with 93 additions and 1 deletions
19
ui/main.cpp
Normal file
19
ui/main.cpp
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#include "core/ARM/cpu.h"
|
||||
#include "core/JIT/jit.h"
|
||||
|
||||
int main() {
|
||||
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.memory[0] = 0x05; // MOVZ placeholder
|
||||
cpu.memory[4] = 0x03; // ADD placeholder
|
||||
cpu.memory[8] = 0xFF; // RET placeholder
|
||||
|
||||
JIT jit;
|
||||
jit.translate_and_run(cpu);
|
||||
|
||||
printf("X0 = %llu\n", cpu.regs[0]);
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue