# compile-register-moves-intel32.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/pwrpc32/code/compile-register-moves-pwrpc32.api#
src/lib/compiler/back/low/sparc32/code/compile-register-moves-sparc32.api#
src/lib/compiler/back/low/code/compile-register-moves.api# Compiled by:
#
src/lib/compiler/back/low/intel32/backend-intel32.libstipulate
package rkj = registerkinds_junk; # registerkinds_junk i s from
src/lib/compiler/back/low/code/registerkinds-junk.pkgherein
api Compile_Register_Moves_Intel32 {
#
package mcf: Machcode_Intel32; # Machcode_Intel32 is from
src/lib/compiler/back/low/intel32/code/machcode-intel32.codemade.api Parallel_Register_Moves
=
{ tmp: Null_Or( mcf::Operand ), # 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;