Mercurial > hg > truffle
comparison src/share/vm/c1/c1_LIRAssembler.cpp @ 17945:15766b73dc1d
8031475: Missing oopmap in patching stubs
Summary: Add patch test for lir_checkcast in compute_oop_map
Reviewed-by: roland, twisti
author | neliasso |
---|---|
date | Wed, 21 May 2014 11:25:25 +0200 |
parents | ef54656d5a65 |
children | 0bf37f737702 |
comparison
equal
deleted
inserted
replaced
17944:abb06af6059b | 17945:15766b73dc1d |
---|---|
56 // we must have enough patching space so that call can be inserted | 56 // we must have enough patching space so that call can be inserted |
57 while ((intx) _masm->pc() - (intx) patch->pc_start() < NativeCall::instruction_size) { | 57 while ((intx) _masm->pc() - (intx) patch->pc_start() < NativeCall::instruction_size) { |
58 _masm->nop(); | 58 _masm->nop(); |
59 } | 59 } |
60 patch->install(_masm, patch_code, obj, info); | 60 patch->install(_masm, patch_code, obj, info); |
61 append_patching_stub(patch); | 61 append_code_stub(patch); |
62 | 62 |
63 #ifdef ASSERT | 63 #ifdef ASSERT |
64 Bytecodes::Code code = info->scope()->method()->java_code_at_bci(info->stack()->bci()); | 64 Bytecodes::Code code = info->scope()->method()->java_code_at_bci(info->stack()->bci()); |
65 if (patch->id() == PatchingStub::access_field_id) { | 65 if (patch->id() == PatchingStub::access_field_id) { |
66 switch (code) { | 66 switch (code) { |
129 | 129 |
130 LIR_Assembler::~LIR_Assembler() { | 130 LIR_Assembler::~LIR_Assembler() { |
131 } | 131 } |
132 | 132 |
133 | 133 |
134 void LIR_Assembler::append_patching_stub(PatchingStub* stub) { | |
135 _slow_case_stubs->append(stub); | |
136 } | |
137 | |
138 | |
139 void LIR_Assembler::check_codespace() { | 134 void LIR_Assembler::check_codespace() { |
140 CodeSection* cs = _masm->code_section(); | 135 CodeSection* cs = _masm->code_section(); |
141 if (cs->remaining() < (int)(NOT_LP64(1*K)LP64_ONLY(2*K))) { | 136 if (cs->remaining() < (int)(NOT_LP64(1*K)LP64_ONLY(2*K))) { |
142 BAILOUT("CodeBuffer overflow"); | 137 BAILOUT("CodeBuffer overflow"); |
143 } | 138 } |
144 } | 139 } |
145 | 140 |
146 | 141 |
147 void LIR_Assembler::emit_code_stub(CodeStub* stub) { | 142 void LIR_Assembler::append_code_stub(CodeStub* stub) { |
148 _slow_case_stubs->append(stub); | 143 _slow_case_stubs->append(stub); |
149 } | 144 } |
150 | 145 |
151 void LIR_Assembler::emit_stubs(CodeStubList* stub_list) { | 146 void LIR_Assembler::emit_stubs(CodeStubList* stub_list) { |
152 for (int m = 0; m < stub_list->length(); m++) { | 147 for (int m = 0; m < stub_list->length(); m++) { |
433 add_debug_info_for_null_check(code_offset(), cinfo); | 428 add_debug_info_for_null_check(code_offset(), cinfo); |
434 } | 429 } |
435 | 430 |
436 void LIR_Assembler::add_debug_info_for_null_check(int pc_offset, CodeEmitInfo* cinfo) { | 431 void LIR_Assembler::add_debug_info_for_null_check(int pc_offset, CodeEmitInfo* cinfo) { |
437 ImplicitNullCheckStub* stub = new ImplicitNullCheckStub(pc_offset, cinfo); | 432 ImplicitNullCheckStub* stub = new ImplicitNullCheckStub(pc_offset, cinfo); |
438 emit_code_stub(stub); | 433 append_code_stub(stub); |
439 } | 434 } |
440 | 435 |
441 void LIR_Assembler::add_debug_info_for_div0_here(CodeEmitInfo* info) { | 436 void LIR_Assembler::add_debug_info_for_div0_here(CodeEmitInfo* info) { |
442 add_debug_info_for_div0(code_offset(), info); | 437 add_debug_info_for_div0(code_offset(), info); |
443 } | 438 } |
444 | 439 |
445 void LIR_Assembler::add_debug_info_for_div0(int pc_offset, CodeEmitInfo* cinfo) { | 440 void LIR_Assembler::add_debug_info_for_div0(int pc_offset, CodeEmitInfo* cinfo) { |
446 DivByZeroStub* stub = new DivByZeroStub(pc_offset, cinfo); | 441 DivByZeroStub* stub = new DivByZeroStub(pc_offset, cinfo); |
447 emit_code_stub(stub); | 442 append_code_stub(stub); |
448 } | 443 } |
449 | 444 |
450 void LIR_Assembler::emit_rtcall(LIR_OpRTCall* op) { | 445 void LIR_Assembler::emit_rtcall(LIR_OpRTCall* op) { |
451 rt_call(op->result_opr(), op->addr(), op->arguments(), op->tmp(), op->info()); | 446 rt_call(op->result_opr(), op->addr(), op->arguments(), op->tmp(), op->info()); |
452 } | 447 } |