## treecode-extension-mythryl.api
# Compiled by:
#
src/lib/compiler/core.sublib# The original MLRISC treecode ("MLTREE") format was intended to be
# not only architecture-agnostic but also compiler-agnostic, since
# it was intended to be a backend for multiple compilers.
#
# Thus, a base compiler-agnostic version of Treecode_Form is defined in
#
#
src/lib/compiler/back/low/treecode/treecode-form.api#
src/lib/compiler/back/low/treecode/treecode-form-g.pkg#
# which may then be extended to particular compilers and architectures
# via the mechanism defined and implemented in
#
#
src/lib/compiler/back/low/treecode/treecode-extension.api#
src/lib/compiler/back/low/treecode/treecode-extension-compiler.api#
# In this file we define those extensions to base treecode_form which are
# common to to all Mythryl-compiler backends. The resulting treecode_form
# is compiler-specific but still architecture-agnostic.
#
# Later, we separately treecode_forms specialized to the particular
# architectures we support, in:
#
#
src/lib/compiler/back/low/main/intel32/treecode-extension-intel32.pkg#
src/lib/compiler/back/low/main/intel32/treecode-extension-compiler-intel32-g.pkg#
src/lib/compiler/back/low/intel32/code/treecode-extension-compiler-intel32.api#
src/lib/compiler/back/low/intel32/code/treecode-extension-sext-intel32.pkg#
src/lib/compiler/back/low/intel32/code/treecode-extension-sext-compiler-intel32-g.pkg#
#
src/lib/compiler/back/low/pwrpc32/code/treecode-extension-sext-pwrpc.pkg#
src/lib/compiler/back/low/pwrpc32/code/treecode-extension-sext-compiler-pwrpc32-g.pkg#
#
src/lib/compiler/back/low/main/sparc32/treecode-extension-sparc32.pkg#
src/lib/compiler/back/low/sparc32/code/treecode-extension-sext-sparc32.pkg#
src/lib/compiler/back/low/sparc32/code/treecode-extension-sext-compiler-sparc32-g.pkg#
src/lib/compiler/back/low/sparc32/code/treecode-extension-sext-compiler-sparc32.api# This api is implemented in:
#
#
src/lib/compiler/back/low/main/nextcode/treecode-extension-mythryl.pkg#
# See also:
#
src/lib/compiler/back/low/main/nextcode/treecode-extension-compiler-mythryl-g.pkg#
api Treecode_Extension_Mythryl {
Sx( S, R, F, C); # "Sx" == "statement extension".
Rx( S, R, F, C); # "Rx" == "(integer) register extension".
Ccx( S, R, F, C); # "Ccx" == "condition code extension". Condition codes reflect ALU bits like Parity/Overflow/Equal/Lessthan/...
Fx (S, R, F, C) # "Fx" == "float-register extension".
= FSINE F
| FCOSINE F
| FTANGENT F;
};