1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2026-04-19 09:23:06 +00:00

re-arrange some ops

This commit is contained in:
David Schmenk
2018-03-05 15:40:43 -08:00
parent f3ef1b4820
commit a8553cfdb7
7 changed files with 16 additions and 66 deletions
+7 -4
View File
@@ -133,7 +133,7 @@ end
def emit_const(cval)#0
emit_pending_seq
if cval == $FFFF // MINUS ONE
emit_byte($80)
emit_byte($20)
elsif cval & $FFF0 == $0000 // Constant NYBBLE
emit_byte(cval*2)
elsif cval & $FF00 == $0000 // Constant BYTE
@@ -308,8 +308,11 @@ def emit_pending_seq#0
//
is CONST_GROUP
if op->opcode == CONST_CODE
if op=>opval == $0000 // ZERO
^codeptr = $00
if op=>opval == $FFFF // MINUS 1
^codeptr = $20
codeptr++
elsif op=>opval & $FFF0 == $0000 // Constant NYBBLE
^codeptr = op->opval*2)
codeptr++
elsif op=>opval & $FF00 == $0000 // Constant BYTE
*codeptr = $2A | (op->opval << 8)
@@ -739,7 +742,7 @@ def gen_uop(seq, tkn)
is COMP_TKN
code = $92; break
is LOGIC_NOT_TKN
code = $20; break
code = $80; break
is INC_TKN
code = $8C; break
is DEC_TKN