public static void allocateSpaceForSysCall(IR ir){
  StackManager sm=(StackManager)ir.stackManager;
  int nToSave=PhysicalRegisterSet.getNumberOfNonvolatileGPRs() + 1;
  sm.allocateSpaceForSysCall(nToSave);
}

public static void allocateSpaceForSysCall ( IR ir ) { StackManager sm = ( StackManager ) ir . stackManager ; int nToSave = PhysicalRegisterSet . getNumberOfNonvolatileGPRs ( ) + 1 ; sm . allocateSpaceForSysCall ( nToSave ) ; }
we have to save / restore the non - volatile registers around syscalls , to protect ourselves from malicious c compilers and linux kernels . < p > although the register allocator is not yet ready to insert these spills , allocate space on the stack in preparation . < p > for now , we naively save / restore all nonvolatiles .
