Remove NOP, fix word aligned state.current mask, overwrite unused entries on Configuration writeback
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing

This commit is contained in:
DataHoarder 2020-12-27 00:10:45 +01:00
parent d40724c096
commit 2f81fe9539
3 changed files with 5 additions and 5 deletions

View file

@ -172,6 +172,10 @@ std::vector<uint8_t> ImageFormat::toBytes() const {
}
}
for (; offset < 0x10000; ++offset) {
bytes[offset] = 0xFF;
}
std::copy(baseImage.begin() + offset, baseImage.end(), bytes.begin() + offset);
for (const auto &entry : instructions) {
@ -225,8 +229,6 @@ void ImageFormat::decodeAnalyzeInstructionsAt(uint32_t offset) {
state.previous = state.current;
auto &instruction = findInstructionByAddress(state.current);
state.current &= 0xfffffffc;
if (instruction == nullptr) {
break;
}

View file

@ -68,8 +68,7 @@ namespace Instruction {
RETURN = 0b11110000,
SET = 0b11111000,
WAIT = 0xFE,
END = 0xFF,
NOP = 0xFF
END = 0xFF
};
static std::unique_ptr<Instruction>

View file

@ -27,7 +27,6 @@
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <cstring>