コード例 #1
0
ファイル: frame_i386.cpp プロジェクト: AdamSpitz/self
// this may not be a self frame ????
oop*  frame::location_addr_of_incoming_argument(Location r, RegisterLocator* rl) { 
  oop* bp = (oop*)my_bp();
  if (r == IReceiverReg)
    return bp + ircvr_offset;
  assert(is_IArgLocation(r), "???");
  fint i = index_for_IArgLocation(r);
  return bp + first_iarg_offset + i;
} 
コード例 #2
0
ファイル: frame_format_i386.cpp プロジェクト: AaronNGray/self
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;
}