mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-16 18:30:32 +00:00
End run around the template.
I have yet to get any insight whatsoever on the reason for GCC's failure here and won't have access to a suitable test machine for a while so all I have for testing is the arduous CI cycle.
This commit is contained in:
parent
626e4fe6b3
commit
ec2d878e3f
@ -1123,3 +1123,7 @@ template class InstructionSet::x86::Decoder<InstructionSet::x86::Model::i8086>;
|
||||
template class InstructionSet::x86::Decoder<InstructionSet::x86::Model::i80186>;
|
||||
template class InstructionSet::x86::Decoder<InstructionSet::x86::Model::i80286>;
|
||||
template class InstructionSet::x86::Decoder<InstructionSet::x86::Model::i80386>;
|
||||
|
||||
std::pair<int, Instruction<false>> Decoder8086::decode(const uint8_t *source, std::size_t length) {
|
||||
return decoder.decode(source, length);
|
||||
}
|
||||
|
@ -228,6 +228,19 @@ template <Model model> 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<int, Instruction<false>> decode(const uint8_t *source, std::size_t length);
|
||||
|
||||
private:
|
||||
Decoder<Model::i8086> decoder;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* InstructionSets_x86_Decoder_hpp */
|
||||
|
@ -416,7 +416,8 @@ class ConcreteMachine:
|
||||
IO io;
|
||||
static constexpr auto model = InstructionSet::x86::Model::i8086;
|
||||
} context;
|
||||
InstructionSet::x86::Decoder<InstructionSet::x86::Model::i8086> decoder;
|
||||
InstructionSet::x86::Decoder8086 decoder;
|
||||
// InstructionSet::x86::Decoder<InstructionSet::x86::Model::i8086> decoder;
|
||||
std::pair<int, InstructionSet::x86::Instruction<false>> decoded;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user