68f98cbad7
itself. Currently it's semantically the same but the implementation is cleaner.
81 lines
838 B
Plaintext
81 lines
838 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
|
|
|
|
# Conversions
|
|
S CII1
|
|
S CII2
|
|
S CII4
|
|
S CII8
|
|
|
|
S CIU1
|
|
S CIU2
|
|
S CIU4
|
|
S CIU8
|
|
|
|
# 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
|
|
|