src/hotspot/share/c1/c1_CodeStubs.hpp
changeset 58932 8623f75be895
parent 53244 9807daeb47c4
equal deleted inserted replaced
58931:304c63b17b07 58932:8623f75be895
   407     masm->bind(_patch_site_continuation);
   407     masm->bind(_patch_site_continuation);
   408     _bytes_to_copy = masm->pc() - pc_start();
   408     _bytes_to_copy = masm->pc() - pc_start();
   409     if (_id == PatchingStub::access_field_id) {
   409     if (_id == PatchingStub::access_field_id) {
   410       // embed a fixed offset to handle long patches which need to be offset by a word.
   410       // embed a fixed offset to handle long patches which need to be offset by a word.
   411       // the patching code will just add the field offset field to this offset so
   411       // the patching code will just add the field offset field to this offset so
   412       // that we can refernce either the high or low word of a double word field.
   412       // that we can reference either the high or low word of a double word field.
   413       int field_offset = 0;
   413       int field_offset = 0;
   414       switch (patch_code) {
   414       switch (patch_code) {
   415       case lir_patch_low:         field_offset = lo_word_offset_in_bytes; break;
   415       case lir_patch_low:         field_offset = lo_word_offset_in_bytes; break;
   416       case lir_patch_high:        field_offset = hi_word_offset_in_bytes; break;
   416       case lir_patch_high:        field_offset = hi_word_offset_in_bytes; break;
   417       case lir_patch_normal:      field_offset = 0;                       break;
   417       case lir_patch_normal:      field_offset = 0;                       break;
   418       default: ShouldNotReachHere();
   418       default: ShouldNotReachHere();
   419       }
   419       }
   420       NativeMovRegMem* n_move = nativeMovRegMem_at(pc_start());
   420       NativeMovRegMem* n_move = nativeMovRegMem_at(pc_start());
   421       n_move->set_offset(field_offset);
   421       n_move->set_offset(field_offset);
       
   422       // Copy will never get executed, so only copy the part which is required for patching.
       
   423       _bytes_to_copy = MAX2(n_move->num_bytes_to_end_of_patch(), (int)NativeGeneralJump::instruction_size);
   422     } else if (_id == load_klass_id || _id == load_mirror_id || _id == load_appendix_id) {
   424     } else if (_id == load_klass_id || _id == load_mirror_id || _id == load_appendix_id) {
   423       assert(_obj != noreg, "must have register object for load_klass/load_mirror");
   425       assert(_obj != noreg, "must have register object for load_klass/load_mirror");
   424 #ifdef ASSERT
   426 #ifdef ASSERT
   425       // verify that we're pointing at a NativeMovConstReg
   427       // verify that we're pointing at a NativeMovConstReg
   426       nativeMovConstReg_at(pc_start());
   428       nativeMovConstReg_at(pc_start());