1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2024-07-08 09:28:57 +00:00

Optimise "CB 1:SHL" to "DUP:ADD"

This saves one byte and by my count is about 11 cycles faster.
This commit is contained in:
Steven Flintham 2017-09-09 00:32:44 +01:00
parent 91b960f263
commit 8c390cbb07

View File

@ -1053,6 +1053,13 @@ int crunch_seq(t_opseq **seq, int pass)
freeops = 1;
break;
}
if (opnext->code == BINARY_CODE(SHL_TOKEN))
{
op->code = DUP_CODE;
opnext->code = BINARY_CODE(ADD_TOKEN);
crunched = 1;
break;
}
}
switch (opnext->code)
{