thumb: add disassembler
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
#include "instruction.hh"
|
||||
#include "util/bits.hh"
|
||||
|
||||
namespace matar {
|
||||
namespace arm {
|
||||
namespace matar::arm {
|
||||
std::string
|
||||
Instruction::disassemble() {
|
||||
auto condition = stringify(this->condition);
|
||||
@@ -232,4 +231,3 @@ Instruction::disassemble() {
|
||||
data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -2,8 +2,7 @@
|
||||
#include "util/bits.hh"
|
||||
#include <iterator>
|
||||
|
||||
namespace matar {
|
||||
namespace arm {
|
||||
namespace matar::arm {
|
||||
Instruction::Instruction(uint32_t insn)
|
||||
: condition(static_cast<Condition>(bit_range(insn, 28, 31))) {
|
||||
// Branch and exhcange
|
||||
@@ -275,4 +274,3 @@ Instruction::Instruction(uint32_t insn)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -5,8 +5,7 @@
|
||||
#include <fmt/ostream.h>
|
||||
#include <variant>
|
||||
|
||||
namespace matar {
|
||||
namespace arm {
|
||||
namespace matar::arm {
|
||||
|
||||
// https://en.cppreference.com/w/cpp/utility/variant/visit
|
||||
template<class... Ts>
|
||||
@@ -223,4 +222,3 @@ struct Instruction {
|
||||
#endif
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user