PreviousUpNext

15.3.131  src/lib/compiler/back/low/mcg/base-pseudo-ops.api

## base-pseudo-ops.api
#
# This is all about generating assembly-code
# pseudo-ops like ALIGN.
#
# This API gets specialized to the Mythryl context
# in Client_Pseudo_Ops_Mythryl per the template api                             # Client_Pseudo_Ops_Mythryl     is from   src/lib/compiler/back/low/main/nextcode/client-pseudo-ops-mythryl.api
# Client_Pseudo_Ops.                                                            # Client_Pseudo_Ops             is from   src/lib/compiler/back/low/mcg/client-pseudo-ops.api

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



# Interface to host assembler. 
# Will handle all constructors in pseudo_op_basis_type except for
# client extensions (EXT)


stipulate
    package lbl =  codelabel;                                                   # codelabel                     is from   src/lib/compiler/back/low/code/codelabel.pkg
    package pbt =  pseudo_op_basis_type;                                        # pseudo_op_basis_type          is from   src/lib/compiler/back/low/mcg/pseudo-op-basis-type.pkg
herein

    api Base_Pseudo_Ops {
        #
        package tcf:  Treecode_Form;                                            # Treecode_Form                 is from   src/lib/compiler/back/low/treecode/treecode-form.api

        Pseudo_Op(X)
            =
            pbt::Pseudo_Op( tcf::Label_Expression, X );

        pseudo_op_to_string:            Pseudo_Op(X) -> String;
        label_expression_to_string:     tcf::Label_Expression -> String;
        define_private_label:           lbl::Codelabel -> String;

        put_pseudo_op
            :
            { pseudo_op:        Pseudo_Op(X),                                   # Pseudo-op to emit.
              loc:              Int,                                            # Location counter
              put_byte:         one_byte_unt::Unt -> Void                       # Output stream.
            }
            ->
            Void;
            #
            # emit value of pseudo op given current location counter and output
            # stream. The value emitted should respect the endianness of the
            # target machine.


        current_pseudo_op_size_in_bytes:  (Pseudo_Op(X), Int) -> Int;
            #
            # Size of the pseudo_op in bytes given the current location counter
            # The location counter is provided in case some pseudo ops are 
            # dependent on alignment considerations.
    };
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