- removed a few unused VM opcodes.

This commit is contained in:
Christoph Oelckers 2017-05-19 10:26:51 +02:00
parent 8ece6dff6a
commit 97b664968e
3 changed files with 0 additions and 35 deletions

View file

@ -104,14 +104,6 @@ void ThrowVMException(VMException *x);
if (a == NULL) { ThrowAbortException(x, nullptr); } \
ptr = (VM_SBYTE *)a + o
static const VM_UWORD ZapTable[16] =
{
0x00000000, 0x000000FF, 0x0000FF00, 0x0000FFFF,
0x00FF0000, 0x00FF00FF, 0x00FFFF00, 0x00FFFFFF,
0xFF000000, 0xFF0000FF, 0xFF00FF00, 0xFF00FFFF,
0xFFFF0000, 0xFFFF00FF, 0xFFFFFF00, 0xFFFFFFFF
};
#ifdef NDEBUG
#define WAS_NDEBUG 1
#else

View file

@ -1195,28 +1195,6 @@ static int Exec(VMFrameStack *stack, const VMOP *pc, VMReturn *ret, int numret)
reg.d[a] = ~reg.d[B];
NEXTOP;
OP(SEXT):
ASSERTD(a); ASSERTD(B);
reg.d[a] = (VM_SWORD)(reg.d[B] << C) >> C;
NEXTOP;
OP(ZAP_R):
ASSERTD(a); ASSERTD(B); ASSERTD(C);
reg.d[a] = reg.d[B] & ZapTable[(reg.d[C] & 15) ^ 15];
NEXTOP;
OP(ZAP_I):
ASSERTD(a); ASSERTD(B);
reg.d[a] = reg.d[B] & ZapTable[(C & 15) ^ 15];
NEXTOP;
OP(ZAPNOT_R):
ASSERTD(a); ASSERTD(B); ASSERTD(C);
reg.d[a] = reg.d[B] & ZapTable[reg.d[C] & 15];
NEXTOP;
OP(ZAPNOT_I):
ASSERTD(a); ASSERTD(B);
reg.d[a] = reg.d[B] & ZapTable[C & 15];
NEXTOP;
OP(EQ_R):
ASSERTD(B); ASSERTD(C);
CMPJMP(reg.d[B] == reg.d[C]);

View file

@ -174,11 +174,6 @@ xx(MAX_RK, max, RIRIKI, MAX_RR, 4, REGT_INT),
xx(ABS, abs, RIRI, NOP, 0, 0), // dA = abs(dB)
xx(NEG, neg, RIRI, NOP, 0, 0), // dA = -dB
xx(NOT, not, RIRI, NOP, 0, 0), // dA = ~dB
xx(SEXT, sext, RIRII8, NOP, 0, 0), // dA = dB, sign extended by shifting left then right by C
xx(ZAP_R, zap, RIRIRI, NOP, 0, 0), // dA = dB, with bytes zeroed where bits in C/dC are one
xx(ZAP_I, zap, RIRII8, NOP, 0, 0),
xx(ZAPNOT_R, zapnot, RIRIRI, NOP, 0, 0), // dA = dB, with bytes zeroed where bits in C/dC are zero
xx(ZAPNOT_I, zapnot, RIRII8, NOP, 0, 0),
xx(EQ_R, beq, CIRR, NOP, 0, 0), // if ((dB == dkC) != A) then pc++
xx(EQ_K, beq, CIRK, EQ_R, 4, REGT_INT),
xx(LT_RR, blt, CIRR, NOP, 0, 0), // if ((dkB < dkC) != A) then pc++