comparison src/cpu/x86/vm/c1_CodeStubs_x86.cpp @ 12160:f98f5d48f511

7199175: JSR 292: C1 needs patching when invokedynamic/invokehandle call site is not linked Summary: Do patching rather bailing out for unlinked call with appendix Reviewed-by: twisti, kvn
author roland
date Wed, 21 Aug 2013 13:34:45 +0200
parents 46f6f063b272
children de6a9e811145
comparison
equal deleted inserted replaced
12159:b17d8f6d9ed7 12160:f98f5d48f511
400 relocInfo::relocType reloc_type = relocInfo::none; 400 relocInfo::relocType reloc_type = relocInfo::none;
401 switch (_id) { 401 switch (_id) {
402 case access_field_id: target = Runtime1::entry_for(Runtime1::access_field_patching_id); break; 402 case access_field_id: target = Runtime1::entry_for(Runtime1::access_field_patching_id); break;
403 case load_klass_id: target = Runtime1::entry_for(Runtime1::load_klass_patching_id); reloc_type = relocInfo::metadata_type; break; 403 case load_klass_id: target = Runtime1::entry_for(Runtime1::load_klass_patching_id); reloc_type = relocInfo::metadata_type; break;
404 case load_mirror_id: target = Runtime1::entry_for(Runtime1::load_mirror_patching_id); reloc_type = relocInfo::oop_type; break; 404 case load_mirror_id: target = Runtime1::entry_for(Runtime1::load_mirror_patching_id); reloc_type = relocInfo::oop_type; break;
405 case load_appendix_id: target = Runtime1::entry_for(Runtime1::load_appendix_patching_id); reloc_type = relocInfo::oop_type; break;
405 default: ShouldNotReachHere(); 406 default: ShouldNotReachHere();
406 } 407 }
407 __ bind(call_patch); 408 __ bind(call_patch);
408 409
409 if (CommentedAssembly) { 410 if (CommentedAssembly) {
417 // Add enough nops so deoptimization can overwrite the jmp above with a call 418 // Add enough nops so deoptimization can overwrite the jmp above with a call
418 // and not destroy the world. 419 // and not destroy the world.
419 for (int j = __ offset() ; j < jmp_off + 5 ; j++ ) { 420 for (int j = __ offset() ; j < jmp_off + 5 ; j++ ) {
420 __ nop(); 421 __ nop();
421 } 422 }
422 if (_id == load_klass_id || _id == load_mirror_id) { 423 if (_id == load_klass_id || _id == load_mirror_id || _id == load_appendix_id) {
423 CodeSection* cs = __ code_section(); 424 CodeSection* cs = __ code_section();
424 RelocIterator iter(cs, (address)_pc_start, (address)(_pc_start + 1)); 425 RelocIterator iter(cs, (address)_pc_start, (address)(_pc_start + 1));
425 relocInfo::change_reloc_info_for_address(&iter, (address) _pc_start, reloc_type, relocInfo::none); 426 relocInfo::change_reloc_info_for_address(&iter, (address) _pc_start, reloc_type, relocInfo::none);
426 } 427 }
427 } 428 }