/*
* 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_MacroAssembler.hpp"
#include "c1/c1_Runtime1.hpp"
#include "classfile/systemDictionary.hpp"
#include "gc_interface/collectedHeap.hpp"
#include "interpreter/interpreter.hpp"
#include "oops/arrayOop.hpp"
#include "oops/markOop.hpp"
#include "runtime/basicLock.hpp"
#include "runtime/biasedLocking.hpp"
#include "runtime/stubRoutines.hpp"
Label L;
// Note: needs more testing of out-of-line vs. inline slow case
bind(L);
}
}
// Create the frame.
}
if (C1Breakpoint) breakpoint_trap();
}
if (C1Breakpoint) breakpoint_trap();
// build frame
verify_FPU(0, "method_entry");
}
void C1_MacroAssembler::lock_object(Register Rmark, Register Roop, Register Rbox, Register Rscratch, Label& slow_case) {
// The following move must be the first instruction of emitted since debug
// information may be generated for it.
// Load object header
// save object being locked into the BasicObjectLock
if (UseBiasedLocking) {
}
// Save Rbox in Rscratch to be used for the cas operation
// and mark it unlocked
// save unlocked object header into the displaced header location on the stack
// compare object markOop with Rmark and if equal exchange Rscratch with object markOop
casx_under_lock(mark_addr.base(), Rmark, Rscratch, (address)StubRoutines::Sparc::atomic_memory_operation_lock_addr());
// hence we are done
// we did not find an unlocked object so see if this is a recursive case
// sub(Rscratch, SP, Rscratch);
}
void C1_MacroAssembler::unlock_object(Register Rmark, Register Roop, Register Rbox, Label& slow_case) {
if (UseBiasedLocking) {
// load the object out of the BasicObjectLock
}
// Test first it it is a fast recursive unlock
if (!UseBiasedLocking) {
// load object
}
// Check if it is still a light weight lock, this is is true if we see
// the stack address of the basicLock in the markOop of the object
casx_under_lock(mark_addr.base(), Rbox, Rmark, (address)StubRoutines::Sparc::atomic_memory_operation_lock_addr());
// Done
}
int con_size_in_bytes, // object size in bytes if known at compile time
) {
if (UseTLAB) {
} else {
}
}
void C1_MacroAssembler::initialize_header(Register obj, Register klass, Register len, Register t1, Register t2) {
} else {
}
if (UseCompressedOops) {
// Save klass
} else {
}
else if (UseCompressedOops) {
}
}
}
int hdr_size, // object header size in words
int obj_size, // object size in words
) {
// allocate space & initialize header
// would need to use extra register to load
// object size => go the slow case for now
return;
}
}
int con_size_in_bytes, // object size in bytes if known at compile time
) {
#ifdef ASSERT
{
if (var_size_in_bytes != noreg) {
} else {
}
stop("bad size in initialize_object");
}
#endif
// initialize body
if (var_size_in_bytes != noreg) {
// use a loop
#ifndef _LP64
// on v9 we can do double word stores to fill twice as much space.
#endif
} else if (con_size_in_bytes <= threshold) {
// use explicit NULL stores
} else if (con_size_in_bytes > hdr_size_in_bytes) {
// use a loop
// compute index = number of words to clear
}
if (CURRENT_ENV->dtrace_alloc_probes()) {
}
}
int hdr_size, // object header size in words
int elt_size, // element size in bytes
) {
// determine alignment mask
// check for negative or excessive length
// note: the maximum length allowed is chosen so that arrays of any
// element size with this length are always smaller or equal
// to the largest integer (i.e., array size computation will
// not overflow)
// compute array size
// note: if 0 <= len <= max_length, len*elt_size + header + alignment is
// smaller or equal to the largest integer; also, since top is always
// aligned, we can do the alignment here instead of at the end address
// computation
switch (elt_size) {
default: ShouldNotReachHere();
}
add(arr_size, hdr_size * wordSize + MinObjAlignmentInBytesMask, arr_size); // add space for header & alignment
// allocate space & initialize header
if (UseTLAB) {
} else {
}
// initialize body
if (CURRENT_ENV->dtrace_alloc_probes()) {
}
}
#ifndef PRODUCT
if (!VerifyOops) return;
}
stop("non-null oop required");
if (!VerifyOops) return;
verify_oop(r);
}
if (iregisters) {
for (int i = 0; i < 6; i++) {
Register r = as_iRegister(i);
}
}
if (oregisters) {
for (int i = 0; i < 6; i++) {
Register r = as_oRegister(i);
}
}
if (lregisters) {
for (int i = 0; i < 8; i++) {
Register r = as_lRegister(i);
}
}
}
#endif