## treecode-extension-compiler.api
#
# Background comments may be found in:
#
#
src/lib/compiler/back/low/treecode/treecode-extension.api#
# This api describes how Treecode extensions are compiled.
#
# In more detail, Treecode_Form, defined in
#
#
src/lib/compiler/back/low/treecode/treecode-form.api#
# is intended to be a largely architecture-agnostic intermediate
# code representation, but we do allow architecture-specific
# extensions to it, primarily to support architecture-specific
# features such as sparc register windows and the x86 floating-point
# stack -- features which cannot be described in terms of the standard
# treecode primitives.
#
# Treecode_Form extensions proper are defined via the api
#
#
src/lib/compiler/back/low/treecode/treecode-extension.api#
# Since the mainline Mythryl compiler code knows nothing about these
# architecture-specific extensions, the programmer defining them must
# also provide custom code to compile them. In this file we define
# the api for doing so.
# Compiled by:
#
src/lib/compiler/back/low/lib/lowhalf.libstipulate
package rkj = registerkinds_junk; # registerkinds_junk is from
src/lib/compiler/back/low/code/registerkinds-junk.pkgherein
api Treecode_Extension_Compiler {
#
package tcf: Treecode_Form; # Treecode_Form is from
src/lib/compiler/back/low/treecode/treecode-form.api # "mcf" == "machcode_form" (abstract machine code).
package mcf: Machcode_Form; # Machcode_Form is from
src/lib/compiler/back/low/code/machcode-form.api # machcode_intel32 is from
src/lib/compiler/back/low/intel32/code/machcode-intel32-g.codemade.pkg # machcode_pwrpc32 is from
src/lib/compiler/back/low/pwrpc32/code/machcode-pwrpc32-g.codemade.pkg # machcode_intel32 is from
src/lib/compiler/back/low/sparc32/code/machcode-sparc32-g.codemade.pkg package tcs: Treecode_Codebuffer # Treecode_Codebuffer is from
src/lib/compiler/back/low/treecode/treecode-codebuffer.api where tcf == tcf; # "tcf" == "treecode_form".
package mcg: Machcode_Controlflow_Graph # Machcode_Controlflow_Graph is from
src/lib/compiler/back/low/mcg/machcode-controlflow-graph.api where
mcf == mcf # "mcf" == "machcode_form" (abstract machine code).
also pop == tcs::cst::pop; # "pop" == "pseudo_op".
# The reducer is given to the client
# during the compilation of the
# user extensions:
#
Reducer
=
tcs::Reducer (
#
mcf::Machine_Op,
mcf::rgk::Codetemplists,
mcf::Operand,
mcf::Addressing_Mode,
mcg::Machcode_Controlflow_Graph
);
compile_sext: Reducer -> { void_expression: tcf::Sext, notes: List(tcf::Note) } -> Void;
compile_rext: Reducer -> { e: (tcf::Int_Bitsize, tcf::Rext ), rd: rkj::Codetemp_Info, notes: List(tcf::Note) } -> Void;
compile_fext: Reducer -> { e: (tcf::Int_Bitsize, tcf::Fext ), fd: rkj::Codetemp_Info, notes: List(tcf::Note) } -> Void;
compile_ccext: Reducer -> { e: (tcf::Int_Bitsize, tcf::Ccext), ccd: rkj::Codetemp_Info, notes: List(tcf::Note) } -> Void;
};
end;
## COPYRIGHT (c) 1995 AT&T Bell Laboratories.
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.