2016-09-24 16:31:35 +00:00
|
|
|
# Flags:
|
|
|
|
# S: has size (use in CONST1, CONST2, CONST4, CONST8 forms)
|
|
|
|
# V: has no size (use in JUMP, CJUMP, RET forms)
|
|
|
|
|
|
|
|
# Simple terminals
|
2016-10-01 17:10:22 +00:00
|
|
|
S CONST # must be followed by float form
|
|
|
|
S CONSTF
|
2016-09-29 17:58:02 +00:00
|
|
|
S REG
|
|
|
|
S LABEL
|
|
|
|
S BLOCK
|
|
|
|
V PAIR
|
|
|
|
S ANY
|
|
|
|
S LOCAL
|
|
|
|
S PHI
|
2016-09-24 16:31:35 +00:00
|
|
|
|
|
|
|
# Magic stack operations
|
2016-09-29 17:58:02 +00:00
|
|
|
S PUSH
|
2016-10-01 17:10:22 +00:00
|
|
|
S POP # must be followed by float form
|
|
|
|
S POPF
|
2016-09-26 20:12:46 +00:00
|
|
|
|
|
|
|
#... Memory operations
|
2016-10-01 17:10:22 +00:00
|
|
|
S LOAD # must be followed by float form
|
|
|
|
S LOADF
|
2016-09-29 17:58:02 +00:00
|
|
|
S STORE
|
2016-09-24 16:31:35 +00:00
|
|
|
|
|
|
|
# Arithemetic operations
|
2016-09-29 17:58:02 +00:00
|
|
|
S ADD
|
|
|
|
S SUB
|
|
|
|
S MUL
|
|
|
|
S DIV
|
|
|
|
S MOD
|
|
|
|
S NEG
|
2016-09-26 20:12:46 +00:00
|
|
|
|
2016-09-29 17:58:02 +00:00
|
|
|
S ADDF
|
|
|
|
S SUBF
|
|
|
|
S MULF
|
|
|
|
S DIVF
|
|
|
|
S NEGF
|
2016-09-26 20:12:46 +00:00
|
|
|
|
2016-09-29 17:58:02 +00:00
|
|
|
S AND
|
|
|
|
S OR
|
|
|
|
S EOR
|
|
|
|
S NOT
|
2016-09-26 20:12:46 +00:00
|
|
|
|
2016-09-24 16:31:35 +00:00
|
|
|
# Conversions
|
2016-09-29 17:58:02 +00:00
|
|
|
S CII1
|
|
|
|
S CII2
|
|
|
|
S CII4
|
|
|
|
S CII8
|
2016-09-26 20:12:46 +00:00
|
|
|
|
2016-09-29 17:58:02 +00:00
|
|
|
S CIU1
|
|
|
|
S CIU2
|
|
|
|
S CIU4
|
|
|
|
S CIU8
|
2016-09-26 20:12:46 +00:00
|
|
|
|
2016-09-24 16:31:35 +00:00
|
|
|
# Tristate comparisons
|
2016-09-29 17:58:02 +00:00
|
|
|
S COMPARES
|
|
|
|
S COMPAREU
|
2016-09-26 20:12:46 +00:00
|
|
|
|
2016-09-24 16:31:35 +00:00
|
|
|
# Boolean comparisons
|
2016-09-29 17:58:02 +00:00
|
|
|
S IFEQ
|
|
|
|
S IFLT
|
|
|
|
S IFLE
|
2016-09-26 20:12:46 +00:00
|
|
|
|
2016-09-24 16:31:35 +00:00
|
|
|
# Procedures
|
2016-09-29 17:58:02 +00:00
|
|
|
V CALL
|
2016-09-26 20:12:46 +00:00
|
|
|
|
2016-09-24 16:31:35 +00:00
|
|
|
# Flow control --- these never return
|
2016-09-29 17:58:02 +00:00
|
|
|
V JUMP
|
|
|
|
V CJUMPEQ
|
|
|
|
V CJUMPLT
|
|
|
|
V CJUMPLE
|
|
|
|
V RET
|
2016-09-24 16:31:35 +00:00
|
|
|
|
|
|
|
# Special
|
2016-09-29 17:58:02 +00:00
|
|
|
S STACKADJUST
|
|
|
|
S GETRET
|
|
|
|
S SETRET
|
2016-09-24 16:31:35 +00:00
|
|
|
|