PreviousUpNext

15.4.376  src/lib/compiler/back/low/sparc32/code/treecode-extension-sext-compiler-sparc32-g.pkg

## treecode-extension-sext-compiler-sparc32-g.pkg
#
# Background comments may be found in:
#
#     src/lib/compiler/back/low/treecode/treecode-extension.api

# Compiled by:
#     src/lib/compiler/back/low/sparc32/backend-sparc32.lib



# Compiling a trivial extensions to the Sparc instruction set
# (UNIMP instruction)




# We are invoked from:
#
#     src/lib/compiler/back/low/main/sparc32/treecode-extension-compiler-sparc32-g.pkg

stipulate
    package isx =  treecode_extension_sext_sparc32;                             # treecode_extension_sext_sparc32               is from   src/lib/compiler/back/low/sparc32/code/treecode-extension-sext-sparc32.pkg
herein

    generic package   treecode_extension_sext_compiler_sparc32_g   (
        #             ==========================================
        #
        package mcf: Machcode_Sparc32;                                          # Machcode_Sparc32                              is from   src/lib/compiler/back/low/sparc32/code/machcode-sparc32.codemade.api

        package tcs: Treecode_Codebuffer                                                # Treecode_Codebuffer                           is from   src/lib/compiler/back/low/treecode/treecode-codebuffer.api
                     where
                         tcf == mcf::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".
    )
    : (weak) Treecode_Extension_Sext_Compiler_Sparc32                           # Treecode_Extension_Sext_Compiler_Sparc32      is from   src/lib/compiler/back/low/sparc32/code/treecode-extension-sext-compiler-sparc32.api
    {
        # Export to client packages:
        #
        package mcg =  mcg;                                                     # "mcg" == "machcode_controlflow_graph".
        package tcs =  tcs;                                                     # "tcs" == "treecode_stream".
        package tcf =  tcs::tcf;                                                # "tcf" == "treecode_form".
        package mcf =  mcf;                                                     # "mcf" == "machcode_form" (abstract machine code).

        stipulate
            package rgk =  mcf::rgk;                                            # "rgk" == "registerkinds".
        herein

            Void_Expression
                =
                isx::Sext
                  (
                    tcf::Void_Expression,
                    tcf::Int_Expression,
                    tcf::Float_Expression,
                    tcf::Flag_Expression
                  );

            Reducer
                =
                tcs::Reducer
                  (
                    mcf::Machine_Op,
                    rgk::Codetemplists,
                    mcf::Operand,
                    mcf::Addressing_Mode,
                    mcg::Machcode_Controlflow_Graph
                  );

            fun compile_sext  reducer
                  {
                    void_expression:    Void_Expression,
                    notes:              List( tcf::Note )
                  }
                =
                {   reducer -> tcs::REDUCER { put_op, ... };

                    case void_expression   
                        #
                        isx::UNIMP i => put_op (mcf::unimp { const22 => i }, notes);
                    esac;
                };
        end;
    };
end;

## COPYRIGHT (c) 2001 Bell Labs, Lucent Technologies
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext