duke@435: /* coleenp@4037: * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. duke@435: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. duke@435: * duke@435: * This code is free software; you can redistribute it and/or modify it duke@435: * under the terms of the GNU General Public License version 2 only, as duke@435: * published by the Free Software Foundation. duke@435: * duke@435: * This code is distributed in the hope that it will be useful, but WITHOUT duke@435: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or duke@435: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License duke@435: * version 2 for more details (a copy is included in the LICENSE file that duke@435: * accompanied this code). duke@435: * duke@435: * You should have received a copy of the GNU General Public License version duke@435: * 2 along with this work; if not, write to the Free Software Foundation, duke@435: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. duke@435: * trims@1907: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA trims@1907: * or visit www.oracle.com if you need additional information or have any trims@1907: * questions. duke@435: * duke@435: */ duke@435: stefank@2314: #include "precompiled.hpp" stefank@2314: #include "c1/c1_CodeStubs.hpp" stefank@2314: #include "c1/c1_FrameMap.hpp" stefank@2314: #include "c1/c1_LIRAssembler.hpp" stefank@2314: #include "c1/c1_MacroAssembler.hpp" stefank@2314: #include "c1/c1_Runtime1.hpp" stefank@2314: #include "nativeInst_x86.hpp" stefank@2314: #include "runtime/sharedRuntime.hpp" jprovino@4542: #include "utilities/macros.hpp" stefank@2314: #include "vmreg_x86.inline.hpp" jprovino@4542: #if INCLUDE_ALL_GCS stefank@2314: #include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp" jprovino@4542: #endif // INCLUDE_ALL_GCS duke@435: duke@435: duke@435: #define __ ce->masm()-> duke@435: duke@435: float ConversionStub::float_zero = 0.0; duke@435: double ConversionStub::double_zero = 0.0; duke@435: duke@435: void ConversionStub::emit_code(LIR_Assembler* ce) { duke@435: __ bind(_entry); duke@435: assert(bytecode() == Bytecodes::_f2i || bytecode() == Bytecodes::_d2i, "other conversions do not require stub"); duke@435: duke@435: duke@435: if (input()->is_single_xmm()) { duke@435: __ comiss(input()->as_xmm_float_reg(), duke@435: ExternalAddress((address)&float_zero)); duke@435: } else if (input()->is_double_xmm()) { duke@435: __ comisd(input()->as_xmm_double_reg(), duke@435: ExternalAddress((address)&double_zero)); duke@435: } else { never@739: LP64_ONLY(ShouldNotReachHere()); never@739: __ push(rax); duke@435: __ ftst(); duke@435: __ fnstsw_ax(); duke@435: __ sahf(); never@739: __ pop(rax); duke@435: } duke@435: duke@435: Label NaN, do_return; duke@435: __ jccb(Assembler::parity, NaN); duke@435: __ jccb(Assembler::below, do_return); duke@435: duke@435: // input is > 0 -> return maxInt duke@435: // result register already contains 0x80000000, so subtracting 1 gives 0x7fffffff duke@435: __ decrement(result()->as_register()); duke@435: __ jmpb(do_return); duke@435: duke@435: // input is NaN -> return 0 duke@435: __ bind(NaN); never@739: __ xorptr(result()->as_register(), result()->as_register()); duke@435: duke@435: __ bind(do_return); duke@435: __ jmp(_continuation); duke@435: } duke@435: duke@435: void CounterOverflowStub::emit_code(LIR_Assembler* ce) { duke@435: __ bind(_entry); iveresov@2138: ce->store_parameter(_method->as_register(), 1); duke@435: ce->store_parameter(_bci, 0); duke@435: __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::counter_overflow_id))); duke@435: ce->add_call_info_here(_info); duke@435: ce->verify_oop_map(_info); duke@435: __ jmp(_continuation); duke@435: } duke@435: duke@435: RangeCheckStub::RangeCheckStub(CodeEmitInfo* info, LIR_Opr index, duke@435: bool throw_index_out_of_bounds_exception) duke@435: : _throw_index_out_of_bounds_exception(throw_index_out_of_bounds_exception) duke@435: , _index(index) duke@435: { roland@2174: assert(info != NULL, "must have info"); roland@2174: _info = new CodeEmitInfo(info); duke@435: } duke@435: duke@435: duke@435: void RangeCheckStub::emit_code(LIR_Assembler* ce) { duke@435: __ bind(_entry); duke@435: // pass the array index on stack because all registers must be preserved duke@435: if (_index->is_cpu_register()) { duke@435: ce->store_parameter(_index->as_register(), 0); duke@435: } else { duke@435: ce->store_parameter(_index->as_jint(), 0); duke@435: } duke@435: Runtime1::StubID stub_id; duke@435: if (_throw_index_out_of_bounds_exception) { duke@435: stub_id = Runtime1::throw_index_exception_id; duke@435: } else { duke@435: stub_id = Runtime1::throw_range_check_failed_id; duke@435: } duke@435: __ call(RuntimeAddress(Runtime1::entry_for(stub_id))); duke@435: ce->add_call_info_here(_info); duke@435: debug_only(__ should_not_reach_here()); duke@435: } duke@435: duke@435: duke@435: void DivByZeroStub::emit_code(LIR_Assembler* ce) { duke@435: if (_offset != -1) { duke@435: ce->compilation()->implicit_exception_table()->append(_offset, __ offset()); duke@435: } duke@435: __ bind(_entry); duke@435: __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::throw_div0_exception_id))); duke@435: ce->add_call_info_here(_info); duke@435: debug_only(__ should_not_reach_here()); duke@435: } duke@435: duke@435: duke@435: // Implementation of NewInstanceStub duke@435: duke@435: NewInstanceStub::NewInstanceStub(LIR_Opr klass_reg, LIR_Opr result, ciInstanceKlass* klass, CodeEmitInfo* info, Runtime1::StubID stub_id) { duke@435: _result = result; duke@435: _klass = klass; duke@435: _klass_reg = klass_reg; duke@435: _info = new CodeEmitInfo(info); duke@435: assert(stub_id == Runtime1::new_instance_id || duke@435: stub_id == Runtime1::fast_new_instance_id || duke@435: stub_id == Runtime1::fast_new_instance_init_check_id, duke@435: "need new_instance id"); duke@435: _stub_id = stub_id; duke@435: } duke@435: duke@435: duke@435: void NewInstanceStub::emit_code(LIR_Assembler* ce) { duke@435: assert(__ rsp_offset() == 0, "frame size should be fixed"); duke@435: __ bind(_entry); never@739: __ movptr(rdx, _klass_reg->as_register()); duke@435: __ call(RuntimeAddress(Runtime1::entry_for(_stub_id))); duke@435: ce->add_call_info_here(_info); duke@435: ce->verify_oop_map(_info); duke@435: assert(_result->as_register() == rax, "result must in rax,"); duke@435: __ jmp(_continuation); duke@435: } duke@435: duke@435: duke@435: // Implementation of NewTypeArrayStub duke@435: duke@435: NewTypeArrayStub::NewTypeArrayStub(LIR_Opr klass_reg, LIR_Opr length, LIR_Opr result, CodeEmitInfo* info) { duke@435: _klass_reg = klass_reg; duke@435: _length = length; duke@435: _result = result; duke@435: _info = new CodeEmitInfo(info); duke@435: } duke@435: duke@435: duke@435: void NewTypeArrayStub::emit_code(LIR_Assembler* ce) { duke@435: assert(__ rsp_offset() == 0, "frame size should be fixed"); duke@435: __ bind(_entry); duke@435: assert(_length->as_register() == rbx, "length must in rbx,"); duke@435: assert(_klass_reg->as_register() == rdx, "klass_reg must in rdx"); duke@435: __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::new_type_array_id))); duke@435: ce->add_call_info_here(_info); duke@435: ce->verify_oop_map(_info); duke@435: assert(_result->as_register() == rax, "result must in rax,"); duke@435: __ jmp(_continuation); duke@435: } duke@435: duke@435: duke@435: // Implementation of NewObjectArrayStub duke@435: duke@435: NewObjectArrayStub::NewObjectArrayStub(LIR_Opr klass_reg, LIR_Opr length, LIR_Opr result, CodeEmitInfo* info) { duke@435: _klass_reg = klass_reg; duke@435: _result = result; duke@435: _length = length; duke@435: _info = new CodeEmitInfo(info); duke@435: } duke@435: duke@435: duke@435: void NewObjectArrayStub::emit_code(LIR_Assembler* ce) { duke@435: assert(__ rsp_offset() == 0, "frame size should be fixed"); duke@435: __ bind(_entry); duke@435: assert(_length->as_register() == rbx, "length must in rbx,"); duke@435: assert(_klass_reg->as_register() == rdx, "klass_reg must in rdx"); duke@435: __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::new_object_array_id))); duke@435: ce->add_call_info_here(_info); duke@435: ce->verify_oop_map(_info); duke@435: assert(_result->as_register() == rax, "result must in rax,"); duke@435: __ jmp(_continuation); duke@435: } duke@435: duke@435: duke@435: // Implementation of MonitorAccessStubs duke@435: duke@435: MonitorEnterStub::MonitorEnterStub(LIR_Opr obj_reg, LIR_Opr lock_reg, CodeEmitInfo* info) duke@435: : MonitorAccessStub(obj_reg, lock_reg) duke@435: { duke@435: _info = new CodeEmitInfo(info); duke@435: } duke@435: duke@435: duke@435: void MonitorEnterStub::emit_code(LIR_Assembler* ce) { duke@435: assert(__ rsp_offset() == 0, "frame size should be fixed"); duke@435: __ bind(_entry); duke@435: ce->store_parameter(_obj_reg->as_register(), 1); duke@435: ce->store_parameter(_lock_reg->as_register(), 0); duke@435: Runtime1::StubID enter_id; duke@435: if (ce->compilation()->has_fpu_code()) { duke@435: enter_id = Runtime1::monitorenter_id; duke@435: } else { duke@435: enter_id = Runtime1::monitorenter_nofpu_id; duke@435: } duke@435: __ call(RuntimeAddress(Runtime1::entry_for(enter_id))); duke@435: ce->add_call_info_here(_info); duke@435: ce->verify_oop_map(_info); duke@435: __ jmp(_continuation); duke@435: } duke@435: duke@435: duke@435: void MonitorExitStub::emit_code(LIR_Assembler* ce) { duke@435: __ bind(_entry); duke@435: if (_compute_lock) { duke@435: // lock_reg was destroyed by fast unlocking attempt => recompute it duke@435: ce->monitor_address(_monitor_ix, _lock_reg); duke@435: } duke@435: ce->store_parameter(_lock_reg->as_register(), 0); duke@435: // note: non-blocking leaf routine => no call info needed duke@435: Runtime1::StubID exit_id; duke@435: if (ce->compilation()->has_fpu_code()) { duke@435: exit_id = Runtime1::monitorexit_id; duke@435: } else { duke@435: exit_id = Runtime1::monitorexit_nofpu_id; duke@435: } duke@435: __ call(RuntimeAddress(Runtime1::entry_for(exit_id))); duke@435: __ jmp(_continuation); duke@435: } duke@435: duke@435: duke@435: // Implementation of patching: duke@435: // - Copy the code at given offset to an inlined buffer (first the bytes, then the number of bytes) duke@435: // - Replace original code with a call to the stub duke@435: // At Runtime: duke@435: // - call to stub, jump to runtime duke@435: // - in runtime: preserve all registers (rspecially objects, i.e., source and destination object) duke@435: // - in runtime: after initializing class, restore original code, reexecute instruction duke@435: duke@435: int PatchingStub::_patch_info_offset = -NativeGeneralJump::instruction_size; duke@435: duke@435: void PatchingStub::align_patch_site(MacroAssembler* masm) { duke@435: // We're patching a 5-7 byte instruction on intel and we need to duke@435: // make sure that we don't see a piece of the instruction. It duke@435: // appears mostly impossible on Intel to simply invalidate other duke@435: // processors caches and since they may do aggressive prefetch it's duke@435: // very hard to make a guess about what code might be in the icache. duke@435: // Force the instruction to be double word aligned so that it duke@435: // doesn't span a cache line. duke@435: masm->align(round_to(NativeGeneralJump::instruction_size, wordSize)); duke@435: } duke@435: duke@435: void PatchingStub::emit_code(LIR_Assembler* ce) { duke@435: assert(NativeCall::instruction_size <= _bytes_to_copy && _bytes_to_copy <= 0xFF, "not enough room for call"); duke@435: duke@435: Label call_patch; duke@435: duke@435: // static field accesses have special semantics while the class duke@435: // initializer is being run so we emit a test which can be used to duke@435: // check that this code is being executed by the initializing duke@435: // thread. duke@435: address being_initialized_entry = __ pc(); duke@435: if (CommentedAssembly) { duke@435: __ block_comment(" patch template"); duke@435: } duke@435: if (_id == load_klass_id) { duke@435: // produce a copy of the load klass instruction for use by the being initialized case coleenp@4037: #ifdef ASSERT duke@435: address start = __ pc(); coleenp@4037: #endif coleenp@4037: Metadata* o = NULL; coleenp@4037: __ mov_metadata(_obj, o); coleenp@4037: #ifdef ASSERT coleenp@4037: for (int i = 0; i < _bytes_to_copy; i++) { coleenp@4037: address ptr = (address)(_pc_start + i); coleenp@4037: int a_byte = (*ptr) & 0xFF; coleenp@4037: assert(a_byte == *start++, "should be the same code"); coleenp@4037: } coleenp@4037: #endif coleenp@4037: } else if (_id == load_mirror_id) { coleenp@4037: // produce a copy of the load mirror instruction for use by the being coleenp@4037: // initialized case coleenp@4037: #ifdef ASSERT coleenp@4037: address start = __ pc(); coleenp@4037: #endif duke@435: jobject o = NULL; duke@435: __ movoop(_obj, o); duke@435: #ifdef ASSERT duke@435: for (int i = 0; i < _bytes_to_copy; i++) { duke@435: address ptr = (address)(_pc_start + i); duke@435: int a_byte = (*ptr) & 0xFF; duke@435: assert(a_byte == *start++, "should be the same code"); duke@435: } duke@435: #endif duke@435: } else { duke@435: // make a copy the code which is going to be patched. twisti@4366: for (int i = 0; i < _bytes_to_copy; i++) { duke@435: address ptr = (address)(_pc_start + i); duke@435: int a_byte = (*ptr) & 0xFF; twisti@4366: __ emit_int8(a_byte); duke@435: *ptr = 0x90; // make the site look like a nop duke@435: } duke@435: } duke@435: duke@435: address end_of_patch = __ pc(); duke@435: int bytes_to_skip = 0; coleenp@4037: if (_id == load_mirror_id) { duke@435: int offset = __ offset(); duke@435: if (CommentedAssembly) { duke@435: __ block_comment(" being_initialized check"); duke@435: } duke@435: assert(_obj != noreg, "must be a valid register"); duke@435: Register tmp = rax; never@2658: Register tmp2 = rbx; never@739: __ push(tmp); never@2658: __ push(tmp2); iveresov@2746: // Load without verification to keep code size small. We need it because iveresov@2746: // begin_initialized_entry_offset has to fit in a byte. Also, we know it's not null. coleenp@4037: __ movptr(tmp2, Address(_obj, java_lang_Class::klass_offset_in_bytes())); duke@435: __ get_thread(tmp); coleenp@4037: __ cmpptr(tmp, Address(tmp2, InstanceKlass::init_thread_offset())); never@2658: __ pop(tmp2); never@739: __ pop(tmp); duke@435: __ jcc(Assembler::notEqual, call_patch); duke@435: duke@435: // access_field patches may execute the patched code before it's duke@435: // copied back into place so we need to jump back into the main duke@435: // code of the nmethod to continue execution. duke@435: __ jmp(_patch_site_continuation); duke@435: duke@435: // make sure this extra code gets skipped duke@435: bytes_to_skip += __ offset() - offset; duke@435: } duke@435: if (CommentedAssembly) { duke@435: __ block_comment("patch data encoded as movl"); duke@435: } duke@435: // Now emit the patch record telling the runtime how to find the duke@435: // pieces of the patch. We only need 3 bytes but for readability of duke@435: // the disassembly we make the data look like a movl reg, imm32, duke@435: // which requires 5 bytes duke@435: int sizeof_patch_record = 5; duke@435: bytes_to_skip += sizeof_patch_record; duke@435: duke@435: // emit the offsets needed to find the code to patch duke@435: int being_initialized_entry_offset = __ pc() - being_initialized_entry + sizeof_patch_record; duke@435: twisti@4366: __ emit_int8((unsigned char)0xB8); twisti@4366: __ emit_int8(0); twisti@4366: __ emit_int8(being_initialized_entry_offset); twisti@4366: __ emit_int8(bytes_to_skip); twisti@4366: __ emit_int8(_bytes_to_copy); duke@435: address patch_info_pc = __ pc(); duke@435: assert(patch_info_pc - end_of_patch == bytes_to_skip, "incorrect patch info"); duke@435: duke@435: address entry = __ pc(); duke@435: NativeGeneralJump::insert_unconditional((address)_pc_start, entry); duke@435: address target = NULL; coleenp@4037: relocInfo::relocType reloc_type = relocInfo::none; duke@435: switch (_id) { duke@435: case access_field_id: target = Runtime1::entry_for(Runtime1::access_field_patching_id); break; coleenp@4037: case load_klass_id: target = Runtime1::entry_for(Runtime1::load_klass_patching_id); reloc_type = relocInfo::metadata_type; break; coleenp@4037: case load_mirror_id: target = Runtime1::entry_for(Runtime1::load_mirror_patching_id); reloc_type = relocInfo::oop_type; break; duke@435: default: ShouldNotReachHere(); duke@435: } duke@435: __ bind(call_patch); duke@435: duke@435: if (CommentedAssembly) { duke@435: __ block_comment("patch entry point"); duke@435: } duke@435: __ call(RuntimeAddress(target)); duke@435: assert(_patch_info_offset == (patch_info_pc - __ pc()), "must not change"); duke@435: ce->add_call_info_here(_info); duke@435: int jmp_off = __ offset(); duke@435: __ jmp(_patch_site_entry); duke@435: // Add enough nops so deoptimization can overwrite the jmp above with a call duke@435: // and not destroy the world. duke@435: for (int j = __ offset() ; j < jmp_off + 5 ; j++ ) { duke@435: __ nop(); duke@435: } coleenp@4037: if (_id == load_klass_id || _id == load_mirror_id) { duke@435: CodeSection* cs = __ code_section(); duke@435: RelocIterator iter(cs, (address)_pc_start, (address)(_pc_start + 1)); coleenp@4037: relocInfo::change_reloc_info_for_address(&iter, (address) _pc_start, reloc_type, relocInfo::none); duke@435: } duke@435: } duke@435: duke@435: twisti@1730: void DeoptimizeStub::emit_code(LIR_Assembler* ce) { twisti@1730: __ bind(_entry); twisti@3244: __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::deoptimize_id))); twisti@1730: ce->add_call_info_here(_info); twisti@3244: DEBUG_ONLY(__ should_not_reach_here()); twisti@1730: } twisti@1730: twisti@1730: duke@435: void ImplicitNullCheckStub::emit_code(LIR_Assembler* ce) { duke@435: ce->compilation()->implicit_exception_table()->append(_offset, __ offset()); duke@435: __ bind(_entry); duke@435: __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::throw_null_pointer_exception_id))); duke@435: ce->add_call_info_here(_info); duke@435: debug_only(__ should_not_reach_here()); duke@435: } duke@435: duke@435: duke@435: void SimpleExceptionStub::emit_code(LIR_Assembler* ce) { duke@435: assert(__ rsp_offset() == 0, "frame size should be fixed"); duke@435: duke@435: __ bind(_entry); duke@435: // pass the object on stack because all registers must be preserved duke@435: if (_obj->is_cpu_register()) { duke@435: ce->store_parameter(_obj->as_register(), 0); duke@435: } duke@435: __ call(RuntimeAddress(Runtime1::entry_for(_stub))); duke@435: ce->add_call_info_here(_info); duke@435: debug_only(__ should_not_reach_here()); duke@435: } duke@435: duke@435: duke@435: void ArrayCopyStub::emit_code(LIR_Assembler* ce) { duke@435: //---------------slow case: call to native----------------- duke@435: __ bind(_entry); duke@435: // Figure out where the args should go coleenp@4037: // This should really convert the IntrinsicID to the Method* and signature duke@435: // but I don't know how to do that. duke@435: // duke@435: VMRegPair args[5]; duke@435: BasicType signature[5] = { T_OBJECT, T_INT, T_OBJECT, T_INT, T_INT}; duke@435: SharedRuntime::java_calling_convention(signature, args, 5, true); duke@435: duke@435: // push parameters duke@435: // (src, src_pos, dest, destPos, length) duke@435: Register r[5]; duke@435: r[0] = src()->as_register(); duke@435: r[1] = src_pos()->as_register(); duke@435: r[2] = dst()->as_register(); duke@435: r[3] = dst_pos()->as_register(); duke@435: r[4] = length()->as_register(); duke@435: duke@435: // next registers will get stored on the stack duke@435: for (int i = 0; i < 5 ; i++ ) { duke@435: VMReg r_1 = args[i].first(); duke@435: if (r_1->is_stack()) { duke@435: int st_off = r_1->reg2stack() * wordSize; never@739: __ movptr (Address(rsp, st_off), r[i]); duke@435: } else { duke@435: assert(r[i] == args[i].first()->as_Register(), "Wrong register for arg "); duke@435: } duke@435: } duke@435: duke@435: ce->align_call(lir_static_call); duke@435: duke@435: ce->emit_static_call_stub(); duke@435: AddressLiteral resolve(SharedRuntime::get_resolve_static_call_stub(), duke@435: relocInfo::static_call_type); duke@435: __ call(resolve); duke@435: ce->add_call_info_here(info()); duke@435: duke@435: #ifndef PRODUCT never@739: __ incrementl(ExternalAddress((address)&Runtime1::_arraycopy_slowcase_cnt)); duke@435: #endif duke@435: duke@435: __ jmp(_continuation); duke@435: } duke@435: ysr@777: ///////////////////////////////////////////////////////////////////////////// jprovino@4542: #if INCLUDE_ALL_GCS ysr@777: ysr@777: void G1PreBarrierStub::emit_code(LIR_Assembler* ce) { johnc@2781: // At this point we know that marking is in progress. johnc@2781: // If do_load() is true then we have to emit the johnc@2781: // load of the previous value; otherwise it has already johnc@2781: // been loaded into _pre_val. ysr@777: ysr@777: __ bind(_entry); ysr@777: assert(pre_val()->is_register(), "Precondition."); ysr@777: ysr@777: Register pre_val_reg = pre_val()->as_register(); ysr@777: johnc@2781: if (do_load()) { johnc@2781: ce->mem2reg(addr(), pre_val(), T_OBJECT, patch_code(), info(), false /*wide*/, false /*unaligned*/); johnc@2781: } ysr@777: apetrusenko@797: __ cmpptr(pre_val_reg, (int32_t) NULL_WORD); ysr@777: __ jcc(Assembler::equal, _continuation); ysr@777: ce->store_parameter(pre_val()->as_register(), 0); ysr@777: __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::g1_pre_barrier_slow_id))); ysr@777: __ jmp(_continuation); ysr@777: ysr@777: } ysr@777: ysr@777: jbyte* G1PostBarrierStub::_byte_map_base = NULL; ysr@777: ysr@777: jbyte* G1PostBarrierStub::byte_map_base_slow() { ysr@777: BarrierSet* bs = Universe::heap()->barrier_set(); ysr@777: assert(bs->is_a(BarrierSet::G1SATBCTLogging), ysr@777: "Must be if we're using this."); ysr@777: return ((G1SATBCardTableModRefBS*)bs)->byte_map_base; ysr@777: } ysr@777: ysr@777: void G1PostBarrierStub::emit_code(LIR_Assembler* ce) { ysr@777: __ bind(_entry); ysr@777: assert(addr()->is_register(), "Precondition."); ysr@777: assert(new_val()->is_register(), "Precondition."); ysr@777: Register new_val_reg = new_val()->as_register(); apetrusenko@797: __ cmpptr(new_val_reg, (int32_t) NULL_WORD); ysr@777: __ jcc(Assembler::equal, _continuation); never@2228: ce->store_parameter(addr()->as_pointer_register(), 0); ysr@777: __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::g1_post_barrier_slow_id))); ysr@777: __ jmp(_continuation); ysr@777: } ysr@777: jprovino@4542: #endif // INCLUDE_ALL_GCS ysr@777: ///////////////////////////////////////////////////////////////////////////// duke@435: duke@435: #undef __