/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "precompiled.hpp"
#include "c1/c1_FrameMap.hpp"
#include "c1/c1_LIR.hpp"
#include "runtime/sharedRuntime.hpp"
#include "vmreg_x86.inline.hpp"
// Convert stack slot to an SP offset
// The calling convention does not count the SharedRuntime::out_preserve_stack_slots() value
// so we must add it in here.
int st_off = (r_1->reg2stack() + SharedRuntime::out_preserve_stack_slots()) * VMRegImpl::stack_slot_size;
} else if (r_1->is_Register()) {
#ifdef _LP64
#else
#endif // _LP64
} else {
}
} else if (r_1->is_FloatRegister()) {
} else {
}
} else if (r_1->is_XMMRegister()) {
} else {
}
} else {
}
return opr;
}
#ifdef _LP64
// r10 and r15 can never contain oops since they aren't available to
// the allocator
#endif // _LP64
}
//--------------------------------------------------------
// FrameMap
//--------------------------------------------------------
#ifndef _LP64
// The unallocatable registers are at the end
#else
// r12 is allocated conditionally. With compressed oops it holds
// the heapbase value and is not visible to the allocator.
// The unallocatable registers are at the end
#endif // _LP64
#ifdef _LP64
#else
#endif // _LP64
_caller_save_cpu_regs[0] = rsi_opr;
#ifdef _LP64
#endif // _LP64
#ifdef _LP64
#endif // _LP64
for (int i = 0; i < 8; i++) {
}
for (int i = 0; i < nof_caller_save_xmm_regs ; i++) {
}
_init_done = true;
#ifdef _LP64
#endif // _LP64
}
// for rbp, based address use this:
// return Address(rbp, in_bytes(sp_offset) - (framesize() - 2) * 4);
}
// ----------------mapping-----------------------
// all mapping is based on rbp, addressing, except for simple leaf methods where we access
// the locals rsp based (and no frame is built)
// Frame for simple leaf methods (quick entries)
//
// +----------+
// | ret addr | <- TOS
// +----------+
// | args |
// | ...... |
// Frame for standard methods
//
// | .........| <- TOS
// | locals |
// +----------+
// | old rbp, | <- EBP
// +----------+
// | ret addr |
// +----------+
// | args |
// | .........|
// For OopMaps, map a local variable or spill index to an VMRegImpl name.
// This is the offset from sp() in the frame of the slot for the index,
// skewed by VMRegImpl::stack0 to indicate a stack location (vs.a register.)
//
// framesize +
// stack0 stack0 0 <- VMReg
// | | <registers> |
// ...........|..............|.............|
// 0 1 2 3 x x 4 5 6 ... | <- local indices
// ^ ^ sp() ( x x indicate link
// | | and return addr)
// arguments non-argument locals
// Return the OptoReg name for the fpu stack slot "n"
// A spilled fpu stack slot comprises to two single-word OptoReg's.
return as_FloatRegister(n)->as_VMReg();
}
}
// JSR 292
return rbp_opr;
}
return true;
}