From cf9b3de8fcb590eed85112e3427b6223f643c90c Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Thu, 29 Feb 2024 01:50:44 +0100 Subject: Faults replace instructions randomly. --- src/instset.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/instset.c') diff --git a/src/instset.c b/src/instset.c index 1333ffb..e0556b0 100644 --- a/src/instset.c +++ b/src/instset.c @@ -3,13 +3,13 @@ #include "instset.h" sbool -si_isInst(sbyte inst) +si_isInst(sword inst) { return inst < SINST_COUNT; } static sbool -isBetween(sbyte inst, sbyte lo, sbyte hi) +isBetween(sword inst, sword lo, sword hi) { assert(si_isInst(inst)); assert(lo < SINST_COUNT); @@ -27,28 +27,28 @@ isBetween(sbyte inst, sbyte lo, sbyte hi) } sbool -si_isMod(sbyte inst) +si_isMod(sword inst) { assert(si_isInst(inst)); return isBetween(inst, SNOP0, SNOP3); } sbool -si_isKey(sbyte inst) +si_isKey(sword inst) { assert(si_isInst(inst)); return isBetween(inst, SKEYA, SKEYP); } sbool -si_isLock(sbyte inst) +si_isLock(sword inst) { assert(si_isInst(inst)); return isBetween(inst, SLOKA, SLOKP); } sbool -si_keyLockMatch(sbyte key, sbyte lock) +si_keyLockMatch(sword key, sword lock) { assert(si_isKey(key)); assert(si_isInst(lock)); -- cgit v1.2.1