Fix bugs and have emulator emulate itself

This commit is contained in:
Justine Tunney 2020-08-31 05:17:31 -07:00
parent 5aabacb361
commit bd29223891
111 changed files with 1283 additions and 2073 deletions

View file

@ -26,8 +26,15 @@
#include "tool/build/lib/throw.h"
static bool IsOpcodeEqual(uint8_t *a, uint8_t b[16], size_t size) {
if (likely(size)) {
return memcmp(a, b, size) == 0;
unsigned i;
if (size) {
i = 0;
do {
if (a[i] != b[i]) {
return false;
}
} while (++i < size);
return true;
} else {
return false;
}