PreviousUpNext

15.3.140  src/lib/compiler/back/low/pwrpc32/code/compile-register-moves-pwrpc32.api

# compile-register-moves-pwrpc32.api

# Given N source registers S and N destination registers D,
# generate an instruction sequence that will copy each Si to Di
# without anything getting clobbered.
#
# In general S and D may overlap, in which case a temporary
# reqister may be needed -- the simplest case is when swapping
# the contents of two registers.  (Yes, there is the "XOR trick",
# but it is too slow for production use.)
#
# Compare to:
#     src/lib/compiler/back/low/sparc32/code/compile-register-moves-sparc32.api
#     src/lib/compiler/back/low/intel32/code/compile-register-moves-intel32.api
#     src/lib/compiler/back/low/code/compile-register-moves.api

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

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

    api Compile_Register_Moves_Pwrpc32 {
        #
        package mcf:  Machcode_Pwrpc32;                                                 # Machcode_Pwrpc32              is from   src/lib/compiler/back/low/pwrpc32/code/machcode-pwrpc32.codemade.api

        Parallel_Register_Moves
          =
          { tmp: Null_Or( mcf::Effective_Address ),                                                     # Temporary register if needed.
            dst: List( rkj::Codetemp_Info ),                                            # Move values in these registers...
            src: List( rkj::Codetemp_Info )                                             # ... into these registers. Lists must be same length.
          };

        compile_int_register_moves:    Parallel_Register_Moves -> List(mcf::Machine_Op);
        compile_float_register_moves:  Parallel_Register_Moves -> List(mcf::Machine_Op);
    };
end;


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext