src/cpu/mips/vm/mips_64.ad

changeset 367
826b64c07856
parent 366
47e82298518d
child 369
4058e1b73a80
     1.1 --- a/src/cpu/mips/vm/mips_64.ad	Sun Mar 05 13:20:40 2017 -0500
     1.2 +++ b/src/cpu/mips/vm/mips_64.ad	Sun Mar 05 16:29:58 2017 -0500
     1.3 @@ -570,7 +570,10 @@
     1.4   *                            *  If we change from JR to JALR, the assert will disappear, but WebClient will
     1.5   *                               *  fail  after the 403th method with unknown reason.
     1.6   *                                  */
     1.7 -  __ li48(T9, (long)OptoRuntime::exception_blob()->entry_point());
     1.8 +  cbuf.set_insts_mark();
     1.9 +  __ relocate(relocInfo::runtime_call_type);
    1.10 +
    1.11 +  __ patchable_set48(T9, (long)OptoRuntime::exception_blob()->entry_point());
    1.12    __ jr(T9);
    1.13    __ delayed()->nop();
    1.14    __ align(16);
    1.15 @@ -596,7 +599,7 @@
    1.16    cbuf.set_insts_mark();
    1.17    __ relocate(relocInfo::runtime_call_type);
    1.18  
    1.19 -  __ li48(T9, (long)SharedRuntime::deopt_blob()->unpack());
    1.20 +  __ patchable_set48(T9, (long)SharedRuntime::deopt_blob()->unpack());
    1.21    __ jalr(T9);
    1.22    __ delayed()->nop();
    1.23    __ align(16);
    1.24 @@ -656,14 +659,14 @@
    1.25  */
    1.26  
    1.27    // static stub relocation also tags the methodOop in the code-stream.
    1.28 -  __ li48(S3, (long)0);
    1.29 +  __ patchable_set48(S3, (long)0);
    1.30    // This is recognized as unresolved by relocs/nativeInst/ic code
    1.31  
    1.32    __ relocate(relocInfo::runtime_call_type);
    1.33  
    1.34    cbuf.set_insts_mark();
    1.35    address call_pc = (address)-1;
    1.36 -  __ li48(AT, (long)call_pc);
    1.37 +  __ patchable_set48(AT, (long)call_pc);
    1.38    __ jr(AT);
    1.39    __ nop();
    1.40    __ align(16);
    1.41 @@ -1614,7 +1617,7 @@
    1.42    __ nop();
    1.43  
    1.44    __ relocate(relocInfo::runtime_call_type);
    1.45 -  __ li48(T9, (long)SharedRuntime::get_ic_miss_stub());
    1.46 +  __ patchable_set48(T9, (long)SharedRuntime::get_ic_miss_stub());
    1.47    __ jr(T9);
    1.48    __ nop();
    1.49  
    1.50 @@ -1658,19 +1661,19 @@
    1.51      address baseaddr = consts_section->start() + -(constant_table.table_base_offset());
    1.52      // RelocationHolder rspec = internal_word_Relocation::spec(baseaddr);
    1.53      __ relocate(relocInfo::internal_pc_type);
    1.54 -    __ li48(Rtoc, (long)baseaddr);
    1.55 +    __ patchable_set48(Rtoc, (long)baseaddr);
    1.56    }
    1.57  }
    1.58  
    1.59  uint MachConstantBaseNode::size(PhaseRegAlloc* ra_) const {
    1.60 -  // li48 (4 insts)
    1.61 +  // patchable_set48 (4 insts)
    1.62    return 4 * 4;
    1.63  }
    1.64  
    1.65  #ifndef PRODUCT
    1.66  void MachConstantBaseNode::format(PhaseRegAlloc* ra_, outputStream* st) const {
    1.67    Register r = as_Register(ra_->get_encode(this));
    1.68 -  st->print("li48    %s, &constanttable (constant table base) @ MachConstantBaseNode", r->name());
    1.69 +  st->print("patchable_set48    %s, &constanttable (constant table base) @ MachConstantBaseNode", r->name());
    1.70  }
    1.71  #endif
    1.72  
    1.73 @@ -3384,7 +3387,7 @@
    1.74      cbuf.set_insts_mark();
    1.75      __ relocate(relocInfo::runtime_call_type);
    1.76  
    1.77 -    __ li48(T9, (long)$meth$$method);
    1.78 +    __ patchable_set48(T9, (long)$meth$$method);
    1.79      __ jalr(T9);
    1.80      __ nop();
    1.81      %}
    1.82 @@ -6503,13 +6506,13 @@
    1.83      	RelocationHolder rspec = metadata_Relocation::spec(klass_index);
    1.84      
    1.85      	__ relocate(rspec);
    1.86 -    	__ li48(dst, (long)value);
    1.87 +    	__ patchable_set48(dst, (long)value);
    1.88      }else if($src->constant_reloc() == relocInfo::oop_type){
    1.89      	int oop_index = __ oop_recorder()->find_index((jobject)value);
    1.90      	RelocationHolder rspec = oop_Relocation::spec(oop_index);
    1.91      
    1.92      	__ relocate(rspec);
    1.93 -    	__ li48(dst, (long)value);
    1.94 +    	__ patchable_set48(dst, (long)value);
    1.95      } else if ($src->constant_reloc() == relocInfo::none) {
    1.96          __ set64(dst, (long)value);
    1.97      }

mercurial