Mem and Regs not part of cpu anymore.

This commit is contained in:
SimoZ64
2025-08-01 21:05:11 +02:00
parent 812b905bdf
commit 010bb5e0bb
35 changed files with 246 additions and 250 deletions

View File

@@ -54,11 +54,11 @@ struct Error {
};
template <class... Args>
std::string Format(Severity severity,
std::optional<u64> lastPC,
std::optional<MemoryAccess> memoryAccess,
std::optional<Type> type,
const std::format_string<Args...> fmt, Args... args) {
void Throw (Severity severity,
Type type,
std::optional<u64> lastPC,
std::optional<MemoryAccess> memoryAccess,
const std::format_string<Args...> fmt, Args... args) {
this->severity = severity;
this->lastPC = lastPC;
this->memoryAccess = memoryAccess;
@@ -74,11 +74,16 @@ struct Error {
return severity == NONE;
}
static Error& Get() {
static Error& GetInstance() {
static Error instance;
return instance;
}
static std::string Get() {
return GetInstance().err;
}
private:
std::string err;
Severity severity = NONE;
Type type = {};
std::optional<u64> lastPC = {};