package com.seaofnodes.simple.node; import com.seaofnodes.simple.codegen.*; import com.seaofnodes.simple.util.SB; public class CallEndMach extends CallEndNode implements MachNode { public CallEndMach( CallEndNode n ) { super(n); } // MachNode specifics, shared across all CPUs public int _xslot; private RegMask _retMask; private RegMask _kills; public void cacheRegs(CodeGen code) { // Return mask depends on TFP (either GPR or FPR) _retMask = code._mach.retMask(call().tfp()); // Kill mask is all caller-saves, and any mirror stack slots for args // in registers. RegMaskRW kills = (call().external() ? code._cCallerSave : code._callerSave).copy(); // Start of stack slots int maxReg = code._mach.regs().length; // Incoming function arg slots, all low numbered in the RA int fslot = fun()._maxArgSlot; // Killed slots for this calls outgoing args int xslot = call().external() ? code._mach.maxArgSlot(call().tfp(),code._cCallingConv) : code._mach.maxArgSlot(call().tfp()); _xslot = (maxReg+fslot)+xslot; for( int i=0; i