mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-07 05:30:30 +00:00
Add notes to self, finally figuring out segment issue.
This commit is contained in:
parent
406c838c39
commit
7ebecd2f41
@ -673,6 +673,9 @@ std::pair<int, typename Decoder<model>::InstructionT> Decoder<model>::decode(con
|
||||
ScaleIndexBase(0, Source::None, Source::eBX),
|
||||
};
|
||||
|
||||
// TODO: unless overridden, BP and SP are always relative to ss; SI to ds; DI to es.
|
||||
// Capture that.
|
||||
|
||||
sib_ = rm_table[rm];
|
||||
}
|
||||
}
|
||||
|
@ -760,12 +760,12 @@ template<bool is_32bit> class Instruction {
|
||||
return AddressSize(mem_exts_source_ >> 7);
|
||||
}
|
||||
|
||||
/// @returns @c Source::DS if no segment override was found; the overridden segment otherwise.
|
||||
/// @returns @c Source::None if no segment override was found; the overridden segment otherwise.
|
||||
/// On x86 a segment override cannot modify the segment used as a destination in string instructions,
|
||||
/// or that used by stack instructions, but this function does not spend the time necessary to provide
|
||||
/// the correct default for those.
|
||||
Source data_segment() const {
|
||||
if(!has_length_extension()) return Source::DS;
|
||||
if(!has_length_extension()) return Source::None;
|
||||
return Source(
|
||||
int(Source::ES) +
|
||||
((length_extension() >> 1) & 7)
|
||||
|
@ -172,6 +172,7 @@ constexpr char TestSuiteHome[] = "/Users/tharte/Projects/ProcessorTests/8088/v1"
|
||||
log_hex();
|
||||
|
||||
// Repeat operand conversions, for debugging.
|
||||
Decoder().decode(data.data(), data.size());
|
||||
const auto destination = decoded.second.destination();
|
||||
to_string(destination, decoded.second);
|
||||
const auto source = decoded.second.source();
|
||||
|
Loading…
x
Reference in New Issue
Block a user