mirror of
https://github.com/TomHarte/CLK.git
synced 2025-04-09 00:37:27 +00:00
Default segment is ::DS if there was no base.
This commit is contained in:
parent
5a5f71e703
commit
c8c0c3ca6d
@ -629,10 +629,11 @@ class DataPointer {
|
||||
/// @returns The default segment to use for this access.
|
||||
constexpr Source default_segment() const {
|
||||
switch(source_) {
|
||||
default: return Source::None;
|
||||
default:
|
||||
case Source::IndirectNoBase:
|
||||
return Source::None;
|
||||
|
||||
case Source::Indirect:
|
||||
case Source::IndirectNoBase:
|
||||
switch(base()) {
|
||||
default: return Source::DS;
|
||||
case Source::eBP:
|
||||
|
@ -153,10 +153,10 @@ constexpr char TestSuiteHome[] = "/Users/tharte/Projects/ProcessorTests/8088/v1"
|
||||
stream << InstructionSet::x86::to_string(pointer.base(), data_size(instruction.address_size()));
|
||||
stream << '+' << InstructionSet::x86::to_string(pointer.index(), data_size(instruction.address_size()));
|
||||
if(instruction.offset()) {
|
||||
stream << '+' << std::setfill('0') << std::setw(4) << std::uppercase << std::hex << instruction.offset() << 'h';
|
||||
stream << '+' << to_hex(instruction.offset(), 4);
|
||||
}
|
||||
} else {
|
||||
stream << to_hex(instruction.operand(), 4);
|
||||
stream << to_hex(instruction.offset(), 4);
|
||||
}
|
||||
stream << ']';
|
||||
return stream.str();
|
||||
|
Loading…
x
Reference in New Issue
Block a user