Esempio n. 1
0
 RegisterString BB::compute_usedTwice() {
   fint len = duInfo.info->length();
   RegisterString used = 0;
   RegisterString usedTwice = 0;
   fint i;
   for (i = 0; i < len; i++) {
     PReg* r = duInfo.info->nth(i)->reg;
     if (r->loc != UnAllocated  &&  isAllocated(used, r->loc)) {
       // two PRegs have same preallocated reg - algorithm below can't handle
       // this
       usedTwice = allocateRegister(usedTwice, r->loc);
     }
     used = allocateRegister(used, r->loc);
   }
   return usedTwice;
 }
Esempio n. 2
0
File: reg.c Progetto: bjnix/pedogogy
/**
 * Allocate a free integer register.
 *
 * @return the register that has been allocated
 */
int allocateIntegerRegister() {
	return allocateRegister(allocatedIntegerRegisters,NUM_INTEGER_REGISTERS);
}