diff --git a/InstructionSets/x86/Instruction.hpp b/InstructionSets/x86/Instruction.hpp index 8e771a472..304ca3374 100644 --- a/InstructionSets/x86/Instruction.hpp +++ b/InstructionSets/x86/Instruction.hpp @@ -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: diff --git a/OSBindings/Mac/Clock SignalTests/8088Tests.mm b/OSBindings/Mac/Clock SignalTests/8088Tests.mm index 4b8afafa5..b4a7edef7 100644 --- a/OSBindings/Mac/Clock SignalTests/8088Tests.mm +++ b/OSBindings/Mac/Clock SignalTests/8088Tests.mm @@ -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();