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-10-03 18:52:36 +00:00
|
|
|
V REG
|
|
|
|
V NOP
|
2016-09-29 17:58:02 +00:00
|
|
|
S LABEL
|
|
|
|
S BLOCK
|
|
|
|
V PAIR
|
|
|
|
S ANY
|
|
|
|
S LOCAL
|
2016-10-03 18:52:36 +00:00
|
|
|
V 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-10-21 21:31:00 +00:00
|
|
|
S STOREF
|
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
|
2016-10-22 08:48:22 +00:00
|
|
|
S DIVU
|
2016-09-29 17:58:02 +00:00
|
|
|
S MOD
|
2016-10-22 18:32:51 +00:00
|
|
|
S MODU
|
2016-09-29 17:58:02 +00:00
|
|
|
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-10-09 13:09:34 +00:00
|
|
|
S ASL
|
|
|
|
S ASR
|
|
|
|
S LSL
|
|
|
|
S LSR
|
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-10-12 20:58:46 +00:00
|
|
|
S CUI1
|
|
|
|
S CUI2
|
|
|
|
S CUI4
|
|
|
|
S CUI8
|
|
|
|
|
2016-10-19 21:29:05 +00:00
|
|
|
S CFI1
|
|
|
|
S CFI2
|
|
|
|
S CFI4
|
|
|
|
S CFI8
|
|
|
|
|
|
|
|
S CIF1
|
|
|
|
S CIF2
|
|
|
|
S CIF4
|
|
|
|
S CIF8
|
|
|
|
|
2016-10-21 22:48:26 +00:00
|
|
|
S CFF1
|
|
|
|
S CFF2
|
|
|
|
S CFF4
|
|
|
|
S CFF8
|
|
|
|
|
2016-09-24 16:31:35 +00:00
|
|
|
# Tristate comparisons
|
2016-10-21 22:48:26 +00:00
|
|
|
S COMPARES1
|
|
|
|
S COMPARES2
|
|
|
|
S COMPARES4
|
|
|
|
S COMPARES8
|
|
|
|
|
|
|
|
S COMPAREU1
|
|
|
|
S COMPAREU2
|
|
|
|
S COMPAREU4
|
|
|
|
S COMPAREU8
|
|
|
|
|
|
|
|
S COMPAREF1
|
|
|
|
S COMPAREF2
|
|
|
|
S COMPAREF4
|
|
|
|
S COMPAREF8
|
2016-09-26 20:12:46 +00:00
|
|
|
|
2016-10-22 18:32:51 +00:00
|
|
|
# Tristate to boolean conversion
|
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-10-22 10:13:57 +00:00
|
|
|
S 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 SETRET
|
2016-10-15 11:07:59 +00:00
|
|
|
S GETFP
|
2016-10-22 09:26:28 +00:00
|
|
|
S GETSP
|
|
|
|
S SETSP
|
2016-10-15 11:07:59 +00:00
|
|
|
S CHAINFP
|
|
|
|
S FPTOARGS
|
2016-09-24 16:31:35 +00:00
|
|
|
|