mirror of
https://github.com/lifting-bits/remill
synced 2026-06-21 13:56:07 +00:00
add type alias
This commit is contained in:
@@ -288,12 +288,15 @@ class Arch {
|
||||
|
||||
// The decoder takes contextual information in the form of a DecodingContext, making a copy to produce a ContextMap which is a function that maps
|
||||
// a successor to a new context that updates the old context.
|
||||
virtual std::optional<DecodingContext::ContextMap>
|
||||
|
||||
using DecodingResult = std::optional<DecodingContext::ContextMap>;
|
||||
|
||||
virtual DecodingResult
|
||||
DecodeInstruction(uint64_t address, std::string_view instr_bytes,
|
||||
Instruction &inst, DecodingContext context) const = 0;
|
||||
|
||||
// Decode an instruction that is within a delay slot.
|
||||
std::optional<DecodingContext::ContextMap>
|
||||
DecodingResult
|
||||
DecodeDelayedInstruction(uint64_t address, std::string_view instr_bytes,
|
||||
Instruction &inst, DecodingContext context) const {
|
||||
inst.in_delay_slot = true;
|
||||
|
||||
+3
-5
@@ -855,11 +855,9 @@ DecodingContext DefaultContextAndLifter::CreateInitialContext(void) const {
|
||||
return DecodingContext();
|
||||
}
|
||||
|
||||
std::optional<DecodingContext::ContextMap>
|
||||
DefaultContextAndLifter::DecodeInstruction(uint64_t address,
|
||||
std::string_view instr_bytes,
|
||||
Instruction &inst,
|
||||
DecodingContext context) const {
|
||||
Arch::DecodingResult DefaultContextAndLifter::DecodeInstruction(
|
||||
uint64_t address, std::string_view instr_bytes, Instruction &inst,
|
||||
DecodingContext context) const {
|
||||
inst.SetLifter(std::make_unique<remill::InstructionLifter>(
|
||||
this, this->GetInstrinsicTable()));
|
||||
if (this->ArchDecodeInstruction(address, instr_bytes, inst)) {
|
||||
|
||||
@@ -366,7 +366,7 @@ std::string CustomLoadImage::getArchType(void) const {
|
||||
void CustomLoadImage::adjustVma(long) {}
|
||||
|
||||
|
||||
std::optional<DecodingContext::ContextMap>
|
||||
SleighArch::DecodingResult
|
||||
SleighArch::DecodeInstruction(uint64_t address, std::string_view instr_bytes,
|
||||
Instruction &inst,
|
||||
DecodingContext context) const {
|
||||
|
||||
Reference in New Issue
Block a user