diff --git a/InstructionSets/x86/Decoder.cpp b/InstructionSets/x86/Decoder.cpp index da58640d1..6b8ccf718 100644 --- a/InstructionSets/x86/Decoder.cpp +++ b/InstructionSets/x86/Decoder.cpp @@ -1123,3 +1123,7 @@ template class InstructionSet::x86::Decoder; template class InstructionSet::x86::Decoder; template class InstructionSet::x86::Decoder; template class InstructionSet::x86::Decoder; + +std::pair> Decoder8086::decode(const uint8_t *source, std::size_t length) { + return decoder.decode(source, length); +} diff --git a/InstructionSets/x86/Decoder.hpp b/InstructionSets/x86/Decoder.hpp index 16d2fef59..47ea4e6e2 100644 --- a/InstructionSets/x86/Decoder.hpp +++ b/InstructionSets/x86/Decoder.hpp @@ -228,6 +228,19 @@ template class Decoder { } }; +// This is a temporary measure; for reasons as-yet unknown, GCC isn't picking up the +// explicit instantiations of the template above at link time, even though is is +// unambiguously building and linking in Decoder.cpp. +// +// So here's a thin non-templated shim to unblock initial PC Compatible development. +class Decoder8086 { + public: + std::pair> decode(const uint8_t *source, std::size_t length); + + private: + Decoder decoder; +}; + } #endif /* InstructionSets_x86_Decoder_hpp */ diff --git a/Machines/PCCompatible/PCCompatible.cpp b/Machines/PCCompatible/PCCompatible.cpp index 13f936acd..a2a55c062 100644 --- a/Machines/PCCompatible/PCCompatible.cpp +++ b/Machines/PCCompatible/PCCompatible.cpp @@ -416,7 +416,8 @@ class ConcreteMachine: IO io; static constexpr auto model = InstructionSet::x86::Model::i8086; } context; - InstructionSet::x86::Decoder decoder; + InstructionSet::x86::Decoder8086 decoder; +// InstructionSet::x86::Decoder decoder; std::pair> decoded; };