5ad3aa8595
how locals and the local base are handled.
93 lines
920 B
Plaintext
93 lines
920 B
Plaintext
# Flags:
|
|
# S: has size (use in CONST1, CONST2, CONST4, CONST8 forms)
|
|
# V: has no size (use in JUMP, CJUMP, RET forms)
|
|
|
|
# Simple terminals
|
|
S CONST # must be followed by float form
|
|
S CONSTF
|
|
V REG
|
|
V NOP
|
|
S LABEL
|
|
S BLOCK
|
|
V PAIR
|
|
S ANY
|
|
S LOCAL
|
|
V PHI
|
|
|
|
# Magic stack operations
|
|
S PUSH
|
|
S POP # must be followed by float form
|
|
S POPF
|
|
|
|
#... Memory operations
|
|
S LOAD # must be followed by float form
|
|
S LOADF
|
|
S STORE
|
|
|
|
# Arithemetic operations
|
|
S ADD
|
|
S SUB
|
|
S MUL
|
|
S DIV
|
|
S MOD
|
|
S NEG
|
|
|
|
S ADDF
|
|
S SUBF
|
|
S MULF
|
|
S DIVF
|
|
S NEGF
|
|
|
|
S AND
|
|
S OR
|
|
S EOR
|
|
S NOT
|
|
S ASL
|
|
S ASR
|
|
S LSL
|
|
S LSR
|
|
|
|
# Conversions
|
|
S CII1
|
|
S CII2
|
|
S CII4
|
|
S CII8
|
|
|
|
S CIU1
|
|
S CIU2
|
|
S CIU4
|
|
S CIU8
|
|
|
|
S CUI1
|
|
S CUI2
|
|
S CUI4
|
|
S CUI8
|
|
|
|
# Tristate comparisons
|
|
S COMPARES
|
|
S COMPAREU
|
|
|
|
# Boolean comparisons
|
|
S IFEQ
|
|
S IFLT
|
|
S IFLE
|
|
|
|
# Procedures
|
|
V CALL
|
|
|
|
# Flow control --- these never return
|
|
V JUMP
|
|
V CJUMPEQ
|
|
V CJUMPLT
|
|
V CJUMPLE
|
|
V RET
|
|
|
|
# Special
|
|
S STACKADJUST
|
|
S GETRET
|
|
S SETRET
|
|
S GETFP
|
|
S CHAINFP
|
|
S FPTOARGS
|
|
|