chore: enclose everything in namespace matar

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2023-09-21 10:52:40 +05:30
parent 1eb4a9545b
commit 1e8966553f
20 changed files with 61 additions and 17 deletions

View File

@@ -4,9 +4,10 @@
using namespace logger;
namespace matar {
void
CpuImpl::exec_arm(const arm::Instruction instruction) {
Condition cond = instruction.condition;
arm::Condition cond = instruction.condition;
arm::InstructionData data = instruction.data;
debug(cpsr.condition(cond));
@@ -537,3 +538,4 @@ CpuImpl::exec_arm(const arm::Instruction instruction) {
} },
data);
}
}

View File

@@ -3,7 +3,8 @@
#include "util/bits.hh"
#include <iterator>
using namespace arm;
namespace matar {
namespace arm {
Instruction::Instruction(uint32_t insn)
: condition(static_cast<Condition>(bit_range(insn, 28, 31))) {
@@ -495,3 +496,5 @@ Instruction::disassemble() {
[](auto) { return std::string("unknown instruction"); } },
data);
}
}
}

View File

@@ -1,3 +1,4 @@
#pragma once
#include "cpu/utility.hh"
#include <cstdint>
#include <variant>
@@ -9,6 +10,7 @@ struct overloaded : Ts... {
template<class... Ts>
overloaded(Ts...) -> overloaded<Ts...>;
namespace matar {
namespace arm {
static constexpr size_t INSTRUCTION_SIZE = 4;
@@ -165,3 +167,4 @@ struct Instruction {
std::string disassemble();
};
}
}