void RangeCheckStub::emit_code(LIR_Assembler* ce) { __ bind(_entry); if (_info->deoptimize_on_exception()) { address a = Runtime1::entry_for(Runtime1::predicate_failed_trap_id); __ far_call(RuntimeAddress(a)); ce->add_call_info_here(_info); ce->verify_oop_map(_info); debug_only(__ should_not_reach_here()); return; } if (_index->is_cpu_register()) { __ mov(rscratch1, _index->as_register()); } else { __ mov(rscratch1, _index->as_jint()); } Runtime1::StubID stub_id; if (_throw_index_out_of_bounds_exception) { stub_id = Runtime1::throw_index_exception_id; } else { stub_id = Runtime1::throw_range_check_failed_id; } __ far_call(RuntimeAddress(Runtime1::entry_for(stub_id)), NULL, rscratch2); ce->add_call_info_here(_info); ce->verify_oop_map(_info); debug_only(__ should_not_reach_here()); }
void PredicateFailedStub::emit_code(LIR_Assembler* ce) { __ bind(_entry); address a = Runtime1::entry_for(Runtime1::predicate_failed_trap_id); __ far_call(RuntimeAddress(a)); ce->add_call_info_here(_info); ce->verify_oop_map(_info); debug_only(__ should_not_reach_here()); }
void CounterOverflowStub::emit_code(LIR_Assembler* ce) { __ bind(_entry); ce->store_parameter(_method->as_register(), 1); ce->store_parameter(_bci, 0); __ far_call(RuntimeAddress(Runtime1::entry_for(Runtime1::counter_overflow_id))); ce->add_call_info_here(_info); ce->verify_oop_map(_info); __ b(_continuation); }
void NewInstanceStub::emit_code(LIR_Assembler* ce) { assert(__ rsp_offset() == 0, "frame size should be fixed"); __ bind(_entry); __ mov(r3, _klass_reg->as_register()); __ far_call(RuntimeAddress(Runtime1::entry_for(_stub_id))); ce->add_call_info_here(_info); ce->verify_oop_map(_info); assert(_result->as_register() == r0, "result must in r0,"); __ b(_continuation); }
void G1PostBarrierStub::emit_code(LIR_Assembler* ce) { __ bind(_entry); assert(addr()->is_register(), "Precondition."); assert(new_val()->is_register(), "Precondition."); Register new_val_reg = new_val()->as_register(); __ cbz(new_val_reg, _continuation); ce->store_parameter(addr()->as_pointer_register(), 0); __ far_call(RuntimeAddress(Runtime1::entry_for(Runtime1::g1_post_barrier_slow_id))); __ b(_continuation); }
void NewObjectArrayStub::emit_code(LIR_Assembler* ce) { assert(__ rsp_offset() == 0, "frame size should be fixed"); __ bind(_entry); assert(_length->as_register() == r19, "length must in r19,"); assert(_klass_reg->as_register() == r3, "klass_reg must in r3"); __ far_call(RuntimeAddress(Runtime1::entry_for(Runtime1::new_object_array_id))); ce->add_call_info_here(_info); ce->verify_oop_map(_info); assert(_result->as_register() == r0, "result must in r0"); __ b(_continuation); }
void call_far_ptr16(){//this is actually a call seg:offset unsigned short off; unsigned short seg; ip++; MemRead16(CS,ip,&seg); ip++;ip++; MemRead16(CS,ip,&off); //*seg--; far_call(seg,off); //oops set them backwards... ohwell // panic("debug #1\n"); }
void CounterOverflowStub::emit_code(LIR_Assembler* ce) { __ bind(_entry); Metadata *m = _method->as_constant_ptr()->as_metadata(); __ mov_metadata(rscratch1, m); ce->store_parameter(rscratch1, 1); ce->store_parameter(_bci, 0); __ far_call(RuntimeAddress(Runtime1::entry_for(Runtime1::counter_overflow_id))); ce->add_call_info_here(_info); ce->verify_oop_map(_info); __ b(_continuation); }
void DivByZeroStub::emit_code(LIR_Assembler* ce) { if (_offset != -1) { ce->compilation()->implicit_exception_table()->append(_offset, __ offset()); } __ bind(_entry); __ far_call(Address(Runtime1::entry_for(Runtime1::throw_div0_exception_id), relocInfo::runtime_call_type)); ce->add_call_info_here(_info); ce->verify_oop_map(_info); #ifdef ASSERT __ should_not_reach_here(); #endif }
void SimpleExceptionStub::emit_code(LIR_Assembler* ce) { assert(__ rsp_offset() == 0, "frame size should be fixed"); __ bind(_entry); // pass the object in a scratch register because all other registers // must be preserved if (_obj->is_cpu_register()) { __ mov(rscratch1, _obj->as_register()); } __ far_call(RuntimeAddress(Runtime1::entry_for(_stub)), NULL, rscratch2); ce->add_call_info_here(_info); debug_only(__ should_not_reach_here()); }
void ImplicitNullCheckStub::emit_code(LIR_Assembler* ce) { address a; if (_info->deoptimize_on_exception()) { // Deoptimize, do not throw the exception, because it is probably wrong to do it here. a = Runtime1::entry_for(Runtime1::predicate_failed_trap_id); } else { a = Runtime1::entry_for(Runtime1::throw_null_pointer_exception_id); } ce->compilation()->implicit_exception_table()->append(_offset, __ offset()); __ bind(_entry); __ far_call(RuntimeAddress(a)); ce->add_call_info_here(_info); ce->verify_oop_map(_info); debug_only(__ should_not_reach_here()); }
void MonitorEnterStub::emit_code(LIR_Assembler* ce) { assert(__ rsp_offset() == 0, "frame size should be fixed"); __ bind(_entry); ce->store_parameter(_obj_reg->as_register(), 1); ce->store_parameter(_lock_reg->as_register(), 0); Runtime1::StubID enter_id; if (ce->compilation()->has_fpu_code()) { enter_id = Runtime1::monitorenter_id; } else { enter_id = Runtime1::monitorenter_nofpu_id; } __ far_call(RuntimeAddress(Runtime1::entry_for(enter_id))); ce->add_call_info_here(_info); ce->verify_oop_map(_info); __ b(_continuation); }
void G1PreBarrierStub::emit_code(LIR_Assembler* ce) { // 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. __ bind(_entry); assert(pre_val()->is_register(), "Precondition."); Register pre_val_reg = pre_val()->as_register(); if (do_load()) { ce->mem2reg(addr(), pre_val(), T_OBJECT, patch_code(), info(), false /*wide*/, false /*unaligned*/); } __ cbz(pre_val_reg, _continuation); ce->store_parameter(pre_val()->as_register(), 0); __ far_call(RuntimeAddress(Runtime1::entry_for(Runtime1::g1_pre_barrier_slow_id))); __ b(_continuation); }
void DeoptimizeStub::emit_code(LIR_Assembler* ce) { __ bind(_entry); __ far_call(RuntimeAddress(Runtime1::entry_for(Runtime1::deoptimize_id))); ce->add_call_info_here(_info); DEBUG_ONLY(__ should_not_reach_here()); }