PreviousUpNext

15.3.200  src/lib/compiler/back/low/treecode/treecode-mult.api

## treecode-mult.api
#
# Let's generate good multiplication/division code!
#
# -- Allen Leung 

# Compiled by:
#     src/lib/compiler/back/low/lib/lowhalf.lib

###               "Lord, grant that I may always desire
###                more than I can accomplish."
###
###                               -- Michelangelo


stipulate
    package rkj =  registerkinds_junk;                                          # registerkinds_junk            is from   src/lib/compiler/back/low/code/registerkinds-junk.pkg
    package tcp =  treecode_pith;                                               # treecode_pith                 is from   src/lib/compiler/back/low/treecode/treecode-pith.pkg
herein

    api Treecode_Mult_Div {
        #
        package tcf:  Treecode_Form;                                            # Treecode_Form                 is from   src/lib/compiler/back/low/treecode/treecode-form.api
        package rgk:  Registerkinds;                                            # Registerkinds                 is from   src/lib/compiler/back/low/code/registerkinds.api

        package mcf: Machcode_Form                                              # Machcode_Form                 is from   src/lib/compiler/back/low/code/machcode-form.api
                     where
                         rgk == rgk;                                            # "rgk" == "registerkinds".

        exception TOO_COMPLEX;

        multiply:  { r: rkj::Codetemp_Info,
                     i: Int,
                     d: rkj::Codetemp_Info
                   }
                   ->
                   List( mcf::Machine_Op );

        divide:    { mode:              tcp::Rounding_Mode,
                     #
                     void_expression:   tcf::Void_Expression -> Void
                   }
                   ->
                   { r: rkj::Codetemp_Info,
                     i: Int,
                     d: rkj::Codetemp_Info
                   }
                   ->
                   List( mcf::Machine_Op );

    };
end;


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext