/*
* 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_CodeStubs.hpp"
#include "c1/c1_FrameMap.hpp"
#include "c1/c1_LIRAssembler.hpp"
#include "c1/c1_MacroAssembler.hpp"
#include "c1/c1_Runtime1.hpp"
#include "nativeInst_sparc.hpp"
#include "runtime/sharedRuntime.hpp"
#include "vmreg_sparc.inline.hpp"
#ifndef SERIALGC
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
#endif
{
}
if (_index->is_register()) {
} else {
}
} else {
}
#ifdef ASSERT
#endif
}
}
if (_offset != -1) {
}
#ifdef ASSERT
#endif
}
#ifdef ASSERT
#endif
}
// Implementation of SimpleExceptionStub
// Note: %g1 and %g3 are already in use
} else {
}
#ifdef ASSERT
#endif
}
// Implementation of NewInstanceStub
NewInstanceStub::NewInstanceStub(LIR_Opr klass_reg, LIR_Opr result, ciInstanceKlass* klass, CodeEmitInfo* info, Runtime1::StubID stub_id) {
"need new_instance id");
}
}
// Implementation of NewTypeArrayStub
NewTypeArrayStub::NewTypeArrayStub(LIR_Opr klass_reg, LIR_Opr length, LIR_Opr result, CodeEmitInfo* info) {
}
}
// Implementation of NewObjectArrayStub
NewObjectArrayStub::NewObjectArrayStub(LIR_Opr klass_reg, LIR_Opr length, LIR_Opr result, CodeEmitInfo* info) {
}
}
// Implementation of MonitorAccessStubs
}
} else {
}
}
if (_compute_lock) {
}
} else {
}
}
// Implementation of patching:
// - Copy the code at given offset to an inlined buffer (first the bytes, then the number of bytes)
// - Replace original code with a call to the stub
// At Runtime:
// - call to stub, jump to runtime
// - in runtime: preserve all registers (especially objects, i.e., source and destination object)
// - in runtime: after initializing class, restore original code, reexecute instruction
// patch sites on sparc are always properly aligned.
}
// copy original code here
"not enough room for call");
if (_id == load_klass_id) {
// produce a copy of the load klass instruction for use by the being initialized case
#ifdef ASSERT
#endif
#ifdef ASSERT
for (int i = 0; i < _bytes_to_copy; i++) {
}
#endif
} else {
// make a copy the code which is going to be patched.
for (int i = 0; i < _bytes_to_copy; i++) {
}
}
int bytes_to_skip = 0;
if (_id == load_klass_id) {
if (CommentedAssembly) {
}
// static field accesses have special semantics while the class
// initializer is being run so we emit a test which can be used to
// check that this code is being executed by the initializing
// thread.
// load_klass patches may execute the patched code before it's
// copied back into place so we need to jump back into the main
// code of the nmethod to continue execution.
// make sure this extra code gets skipped
}
// Now emit the patch record telling the runtime how to find the
// pieces of the patch. We only need 3 bytes but it has to be
// aligned as an instruction so emit 4 bytes.
// emit the offsets needed to find the code to patch
// Emit the patch record. We need to emit a full word, so emit an extra empty byte
switch (_id) {
default: ShouldNotReachHere();
}
if (CommentedAssembly) {
}
if (_id == load_klass_id) {
relocInfo::change_reloc_info_for_address(&iter, (address) pc, relocInfo::oop_type, relocInfo::none);
relocInfo::change_reloc_info_for_address(&iter2, (address) pc, relocInfo::oop_type, relocInfo::none);
}
}
}
//---------------slow case: call to native-----------------
#ifndef PRODUCT
#endif
}
///////////////////////////////////////////////////////////////////////////////////
#ifndef SERIALGC
// At this point we know that marking is in progress.
// If do_load() is true then we have to emit the
// load of the previous value; otherwise it has already
// been loaded into _pre_val.
if (do_load()) {
ce->mem2reg(addr(), pre_val(), T_OBJECT, patch_code(), info(), false /*wide*/, false /*unaligned*/);
}
} else {
}
}
"Must be if we're using this.");
}
} else {
}
}
#endif // SERIALGC
///////////////////////////////////////////////////////////////////////////////////