1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-26 08:49:37 +00:00

Resolve sizing types.

This commit is contained in:
Thomas Harte 2023-12-24 14:26:15 -05:00
parent cbd4f7965b
commit 795529ef97
2 changed files with 3 additions and 3 deletions

View File

@ -26,8 +26,8 @@ std::pair<int, typename Decoder<model>::InstructionT> Decoder<model>::decode(con
// be back to wherever it started, so it's safe to spit out a NOP and reset parsing // be back to wherever it started, so it's safe to spit out a NOP and reset parsing
// without any loss of context. This reduces the risk of the decoder tricking a caller into // without any loss of context. This reduces the risk of the decoder tricking a caller into
// an infinite loop. // an infinite loop.
static constexpr std::size_t max_instruction_length = model >= Model::i80386 ? 15 : (model == Model::i80286 ? 10 : 65536); static constexpr int max_instruction_length = model >= Model::i80386 ? 15 : (model == Model::i80286 ? 10 : 65536);
const uint8_t *const end = source + std::min(length, max_instruction_length - consumed_); const uint8_t *const end = source + std::min(length, size_t(max_instruction_length - consumed_));
// MARK: - Prefixes (if present) and the opcode. // MARK: - Prefixes (if present) and the opcode.

View File

@ -172,7 +172,7 @@ template <Model model> class Decoder {
// Ephemeral decoding state. // Ephemeral decoding state.
Operation operation_ = Operation::Invalid; Operation operation_ = Operation::Invalid;
uint32_t consumed_ = 0, operand_bytes_ = 0; int consumed_ = 0, operand_bytes_ = 0;
// Source and destination locations. // Source and destination locations.
Source source_ = Source::None; Source source_ = Source::None;