hotspot/src/cpu/x86/vm/c1_FrameMap_x86.cpp
author duke
Sat, 01 Dec 2007 00:00:00 +0000
changeset 1 489c9b5090e2
child 1066 717c3345024f
permissions -rw-r--r--
Initial load
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
489c9b5090e2 Initial load
duke
parents:
diff changeset
     2
 * Copyright 1999-2006 Sun Microsystems, Inc.  All Rights Reserved.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    19
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    20
 * CA 95054 USA or visit www.sun.com if you need additional information or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    21
 * have any questions.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
489c9b5090e2 Initial load
duke
parents:
diff changeset
    25
# include "incls/_precompiled.incl"
489c9b5090e2 Initial load
duke
parents:
diff changeset
    26
# include "incls/_c1_FrameMap_x86.cpp.incl"
489c9b5090e2 Initial load
duke
parents:
diff changeset
    27
489c9b5090e2 Initial load
duke
parents:
diff changeset
    28
const int FrameMap::pd_c_runtime_reserved_arg_size = 0;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
LIR_Opr FrameMap::map_to_opr(BasicType type, VMRegPair* reg, bool) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
  LIR_Opr opr = LIR_OprFact::illegalOpr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
  VMReg r_1 = reg->first();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
  VMReg r_2 = reg->second();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
  if (r_1->is_stack()) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
    // Convert stack slot to an SP offset
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
    // The calling convention does not count the SharedRuntime::out_preserve_stack_slots() value
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
    // so we must add it in here.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
    int st_off = (r_1->reg2stack() + SharedRuntime::out_preserve_stack_slots()) * VMRegImpl::stack_slot_size;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
    opr = LIR_OprFact::address(new LIR_Address(rsp_opr, st_off, type));
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
  } else if (r_1->is_Register()) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
    Register reg = r_1->as_Register();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
    if (r_2->is_Register()) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
      Register reg2 = r_2->as_Register();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
      opr = as_long_opr(reg2, reg);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
    } else if (type == T_OBJECT) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
      opr = as_oop_opr(reg);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
    } else {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
      opr = as_opr(reg);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
  } else if (r_1->is_FloatRegister()) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
    assert(type == T_DOUBLE || type == T_FLOAT, "wrong type");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
    int num = r_1->as_FloatRegister()->encoding();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
    if (type == T_FLOAT) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
      opr = LIR_OprFact::single_fpu(num);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
    } else {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
      opr = LIR_OprFact::double_fpu(num);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
  } else if (r_1->is_XMMRegister()) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
    assert(type == T_DOUBLE || type == T_FLOAT, "wrong type");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
    int num = r_1->as_XMMRegister()->encoding();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
    if (type == T_FLOAT) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
      opr = LIR_OprFact::single_xmm(num);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
    } else {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
      opr = LIR_OprFact::double_xmm(num);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
  } else {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
    ShouldNotReachHere();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
  return opr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
LIR_Opr FrameMap::rsi_opr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
LIR_Opr FrameMap::rdi_opr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
LIR_Opr FrameMap::rbx_opr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
LIR_Opr FrameMap::rax_opr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
LIR_Opr FrameMap::rdx_opr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
LIR_Opr FrameMap::rcx_opr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
LIR_Opr FrameMap::rsp_opr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
LIR_Opr FrameMap::rbp_opr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
LIR_Opr FrameMap::receiver_opr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
LIR_Opr FrameMap::rsi_oop_opr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
LIR_Opr FrameMap::rdi_oop_opr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
LIR_Opr FrameMap::rbx_oop_opr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
LIR_Opr FrameMap::rax_oop_opr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
LIR_Opr FrameMap::rdx_oop_opr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
LIR_Opr FrameMap::rcx_oop_opr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
LIR_Opr FrameMap::rax_rdx_long_opr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
LIR_Opr FrameMap::rbx_rcx_long_opr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
LIR_Opr FrameMap::fpu0_float_opr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
LIR_Opr FrameMap::fpu0_double_opr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
LIR_Opr FrameMap::xmm0_float_opr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
LIR_Opr FrameMap::xmm0_double_opr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
LIR_Opr FrameMap::_caller_save_cpu_regs[] = { 0, };
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
LIR_Opr FrameMap::_caller_save_fpu_regs[] = { 0, };
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
LIR_Opr FrameMap::_caller_save_xmm_regs[] = { 0, };
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
XMMRegister FrameMap::_xmm_regs [8] = { 0, };
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
XMMRegister FrameMap::nr2xmmreg(int rnr) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
  assert(_init_done, "tables not initialized");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
  return _xmm_regs[rnr];
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
//--------------------------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
//               FrameMap
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
//--------------------------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
void FrameMap::init() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
  if (_init_done) return;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
  assert(nof_cpu_regs == 8, "wrong number of CPU registers");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
  map_register(0, rsi);  rsi_opr = LIR_OprFact::single_cpu(0);  rsi_oop_opr = LIR_OprFact::single_cpu_oop(0);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
  map_register(1, rdi);  rdi_opr = LIR_OprFact::single_cpu(1);  rdi_oop_opr = LIR_OprFact::single_cpu_oop(1);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
  map_register(2, rbx);  rbx_opr = LIR_OprFact::single_cpu(2);  rbx_oop_opr = LIR_OprFact::single_cpu_oop(2);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
  map_register(3, rax);  rax_opr = LIR_OprFact::single_cpu(3);  rax_oop_opr = LIR_OprFact::single_cpu_oop(3);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
  map_register(4, rdx);  rdx_opr = LIR_OprFact::single_cpu(4);  rdx_oop_opr = LIR_OprFact::single_cpu_oop(4);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
  map_register(5, rcx);  rcx_opr = LIR_OprFact::single_cpu(5);  rcx_oop_opr = LIR_OprFact::single_cpu_oop(5);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
  map_register(6, rsp);  rsp_opr = LIR_OprFact::single_cpu(6);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
  map_register(7, rbp);  rbp_opr = LIR_OprFact::single_cpu(7);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
  rax_rdx_long_opr = LIR_OprFact::double_cpu(3 /*eax*/, 4 /*edx*/);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
  rbx_rcx_long_opr = LIR_OprFact::double_cpu(2 /*ebx*/, 5 /*ecx*/);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
  fpu0_float_opr   = LIR_OprFact::single_fpu(0);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
  fpu0_double_opr  = LIR_OprFact::double_fpu(0);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
  xmm0_float_opr   = LIR_OprFact::single_xmm(0);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
  xmm0_double_opr  = LIR_OprFact::double_xmm(0);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
  _caller_save_cpu_regs[0] = rsi_opr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
  _caller_save_cpu_regs[1] = rdi_opr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
  _caller_save_cpu_regs[2] = rbx_opr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
  _caller_save_cpu_regs[3] = rax_opr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
  _caller_save_cpu_regs[4] = rdx_opr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
  _caller_save_cpu_regs[5] = rcx_opr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
  _xmm_regs[0] = xmm0;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
  _xmm_regs[1] = xmm1;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
  _xmm_regs[2] = xmm2;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
  _xmm_regs[3] = xmm3;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
  _xmm_regs[4] = xmm4;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
  _xmm_regs[5] = xmm5;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
  _xmm_regs[6] = xmm6;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
  _xmm_regs[7] = xmm7;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
  for (int i = 0; i < 8; i++) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
    _caller_save_fpu_regs[i] = LIR_OprFact::single_fpu(i);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
    _caller_save_xmm_regs[i] = LIR_OprFact::single_xmm(i);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
  _init_done = true;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
  VMRegPair regs;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
  BasicType sig_bt = T_OBJECT;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
  SharedRuntime::java_calling_convention(&sig_bt, &regs, 1, true);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
  receiver_opr = as_oop_opr(regs.first()->as_Register());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
  assert(receiver_opr == rcx_oop_opr, "rcvr ought to be rcx");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
Address FrameMap::make_new_address(ByteSize sp_offset) const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
  // for rbp, based address use this:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
  // return Address(rbp, in_bytes(sp_offset) - (framesize() - 2) * 4);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
  return Address(rsp, in_bytes(sp_offset));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
// ----------------mapping-----------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
// all mapping is based on rbp, addressing, except for simple leaf methods where we access
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
// the locals rsp based (and no frame is built)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
// Frame for simple leaf methods (quick entries)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
//
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
//   +----------+
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
//   | ret addr |   <- TOS
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
//   +----------+
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
//   | args     |
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
//   | ......   |
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
// Frame for standard methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
//
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
//   | .........|  <- TOS
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
//   | locals   |
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
//   +----------+
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
//   | old rbp,  |  <- EBP
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
//   +----------+
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
//   | ret addr |
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
//   +----------+
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
//   |  args    |
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
//   | .........|
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
// For OopMaps, map a local variable or spill index to an VMRegImpl name.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   199
// This is the offset from sp() in the frame of the slot for the index,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   200
// skewed by VMRegImpl::stack0 to indicate a stack location (vs.a register.)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   201
//
489c9b5090e2 Initial load
duke
parents:
diff changeset
   202
//           framesize +
489c9b5090e2 Initial load
duke
parents:
diff changeset
   203
//           stack0         stack0          0  <- VMReg
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
//             |              | <registers> |
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
//  ...........|..............|.............|
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
//      0 1 2 3 x x 4 5 6 ... |                <- local indices
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
//      ^           ^        sp()                 ( x x indicate link
489c9b5090e2 Initial load
duke
parents:
diff changeset
   208
//      |           |                               and return addr)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
//  arguments   non-argument locals
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
489c9b5090e2 Initial load
duke
parents:
diff changeset
   212
VMReg FrameMap::fpu_regname (int n) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
  // Return the OptoReg name for the fpu stack slot "n"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
  // A spilled fpu stack slot comprises to two single-word OptoReg's.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
  return as_FloatRegister(n)->as_VMReg();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
LIR_Opr FrameMap::stack_pointer() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
  return FrameMap::rsp_opr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   221
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
bool FrameMap::validate_frame() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
  return true;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
}