Esempio n. 1
0
 void BB::doAlloc(PReg* r, Location l) {
   assert( !r->cpInfo,
           "should not allocate to a PReg that has been copy-propagated");
   if (PrintSICTempRegisterAllocation) {
     lprintf("*assigning %s to temp %s in BB%ld\n",
            locationName(l), r->name(), (void*)id());
   }
   assert(!r->debug, "should not allocate to temp reg");
   r->loc = l;
   theSIC->check_flushability(r);
 }
Esempio n. 2
0
void reg_disp_type_of_loc(Location* basep, int32* offsetp, OperandType* tp, Location loc) {
  Location b = IllegalLocation;  int32 d = 0;  OperandType t = NumberOperand;
  
       if (isRegister(loc))  b = loc, d = 0, t = RegisterOperand;
       
  else if (loc == IReceiverReg  || is_IArgLocation(loc))  b = ebp,  d =  index_for_IArgLocation(loc) + 1 +     ircvr_offset;
  else if (loc == LReceiverReg  || is_LArgLocation(loc))  b = esp,  d =  index_for_LArgLocation(loc) + 1 + leaf_rcvr_offset;
  else if (loc ==  ReceiverReg  ||  is_ArgLocation(loc))  b = esp,  d =  index_for_ArgLocation(loc)  + 1 +   rcvr_offset;
  else if (                       is_StackLocation(loc))  b = ebp,  d = -index_for_StackLocation(loc) + first_local_offset;
  else fatal1("don't know how to do %s\n", locationName(loc));

  if (basep) *basep = b;
  if (offsetp) *offsetp = d * oopSize;
  if (tp) *tp = t;
}