pound-emu_pound/core/ARM/cpu.h
2025-06-05 21:03:38 -04:00

17 lines
No EOL
321 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef CPU_H
#define CPU_H
#include <cstdint>
#include <cstring>
struct CPU {
uint64_t regs[31] = {0}; // X0X30
uint64_t pc = 0;
static const size_t MEM_SIZE = 64 * 1024;
uint8_t memory[MEM_SIZE];
CPU() { std::memset(memory, 0, MEM_SIZE); }
uint64_t& x(int i) { return regs[i]; }
};
#endif