void LongRegisterString::deallocate(Location l) { if (isRegister(l)) { bv->remove(l); } else { assert(isStackRegister(l), "should be stack reg"); fint i = tempToIndex(l); bv->remove(i); } }
void LongRegisterMask::deallocate(Location l) { if (l.isRegister()) { bv->remove(l.number()); } else { assert(l.isStackLocation(), "should be stack reg"); int i = tempToIndex(l); bv->remove(i); } }
void LongRegisterString::doAllocate(Location l) { if (isRegister(l)) { bv->add(l); } else { assert(isStackRegister(l), "should be stack reg"); fint i = tempToIndex(l); if (i >= bv->length) grow(i); bv->add(i); } }
void LongRegisterMask::allocate(Location l) { if (l.isRegister()) { bv->add(l.number()); } else { assert(l.isStackLocation(), "should be stack reg"); int i = tempToIndex(l); if (i >= bv->length) grow(); bv->add(i); } }
bool LongRegisterString::isAllocated(Location l) { if (isRegister(l)) { return bv->includes(l); } else { assert(isStackRegister(l), "should be stack reg"); fint i = tempToIndex(l); if (i < bv->length) { return bv->includes(i); } else { return false; } } }
bool LongRegisterMask::isAllocated(Location l) { if (l.isRegister()) { return bv->includes(l.number()); } else { assert(l.isStackLocation(), "should be stack reg"); int i = tempToIndex(l); if (l.number() < bv->length) { return bv->includes(i); } else { return false; } } }
Location findFirstUnusedTemp(LongRegisterString** strings, fint len) { fint i = findFirstUnused(strings, len, tempToIndex(StackLocation_for_index(0))); return indexToTemp(i); }