1076 #endif |
1076 #endif |
1077 if (do_patch) { |
1077 if (do_patch) { |
1078 // replace instructions |
1078 // replace instructions |
1079 // first replace the tail, then the call |
1079 // first replace the tail, then the call |
1080 #ifdef ARM |
1080 #ifdef ARM |
1081 if(load_klass_or_mirror_patch_id && !VM_Version::supports_movw()) { |
1081 if((load_klass_or_mirror_patch_id || |
|
1082 stub_id == Runtime1::load_appendix_patching_id) && |
|
1083 !VM_Version::supports_movw()) { |
1082 nmethod* nm = CodeCache::find_nmethod(instr_pc); |
1084 nmethod* nm = CodeCache::find_nmethod(instr_pc); |
1083 address addr = NULL; |
1085 address addr = NULL; |
1084 assert(nm != NULL, "invalid nmethod_pc"); |
1086 assert(nm != NULL, "invalid nmethod_pc"); |
1085 RelocIterator mds(nm, copy_buff, copy_buff + 1); |
1087 RelocIterator mds(nm, copy_buff, copy_buff + 1); |
1086 while (mds.next()) { |
1088 while (mds.next()) { |
1087 if (mds.type() == relocInfo::oop_type) { |
1089 if (mds.type() == relocInfo::oop_type) { |
1088 assert(stub_id == Runtime1::load_mirror_patching_id, "wrong stub id"); |
1090 assert(stub_id == Runtime1::load_mirror_patching_id || |
|
1091 stub_id == Runtime1::load_appendix_patching_id, "wrong stub id"); |
1089 oop_Relocation* r = mds.oop_reloc(); |
1092 oop_Relocation* r = mds.oop_reloc(); |
1090 addr = (address)r->oop_addr(); |
1093 addr = (address)r->oop_addr(); |
1091 break; |
1094 break; |
1092 } else if (mds.type() == relocInfo::metadata_type) { |
1095 } else if (mds.type() == relocInfo::metadata_type) { |
1093 assert(stub_id == Runtime1::load_klass_patching_id, "wrong stub id"); |
1096 assert(stub_id == Runtime1::load_klass_patching_id, "wrong stub id"); |