tests: complete disassembler tests

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2023-09-17 09:50:32 +05:30
parent be7deb349a
commit dd9dd5f116
17 changed files with 389 additions and 90 deletions

View File

@@ -35,7 +35,7 @@ class Cpu {
bool is_flushed;
void chg_mode(const Mode to);
void exec_arm(const arm::ArmInstruction instruction);
void exec_arm(const arm::Instruction instruction);
struct {
std::array<uint32_t, GPR_COUNT - GPR_FIQ_FIRST - 1> fiq;

View File

@@ -64,7 +64,6 @@ struct HalfwordTransfer {
uint8_t rn;
bool load;
bool write;
bool byte;
bool imm;
bool up;
bool pre;
@@ -152,11 +151,11 @@ using InstructionData = std::variant<BranchAndExchange,
Undefined,
SoftwareInterrupt>;
struct ArmInstruction {
struct Instruction {
Condition condition;
InstructionData data;
ArmInstruction(uint32_t insn);
Instruction(uint32_t insn);
std::string disassemble();
};
}