src/cpu/mips/vm/c1_LIRAssembler_mips.cpp

changeset 9228
617b86d17edb
parent 9224
59272e7eeeed
child 9236
8c78449ff413
     1.1 --- a/src/cpu/mips/vm/c1_LIRAssembler_mips.cpp	Mon Sep 03 14:27:42 2018 +0800
     1.2 +++ b/src/cpu/mips/vm/c1_LIRAssembler_mips.cpp	Tue Sep 04 21:25:12 2018 +0800
     1.3 @@ -341,12 +341,10 @@
     1.4    RelocationHolder rspec = oop_Relocation::spec(oop_index);
     1.5    __ relocate(rspec);
     1.6  #ifndef _LP64
     1.7 -//by_css
     1.8    __ lui(reg, Assembler::split_high((int)o));
     1.9    __ addiu(reg, reg, Assembler::split_low((int)o));
    1.10  #else
    1.11 -//li may not pass NativeMovConstReg::verify. see nativeMovConstReg_at(pc_start()); in PatchingStub::install. by aoqi
    1.12 -//  __ li48(reg, (long)o);
    1.13 +//li may not pass NativeMovConstReg::verify. see nativeMovConstReg_at(pc_start()); in PatchingStub::install.
    1.14    __ li48(reg, (long)o);
    1.15  #endif
    1.16    // patching_epilog(patch, LIR_Op1::patch_normal, noreg, info);
    1.17 @@ -530,7 +528,6 @@
    1.18    // Now T3 is the address of the first char in second string(T1)
    1.19  
    1.20  #ifndef _LP64
    1.21 -//by_css
    1.22    // compute minimum length (in T4) and difference of lengths (V0)
    1.23    Label L;
    1.24    __ lw (T4, Address(T0, java_lang_String::count_offset_in_bytes()));
    1.25 @@ -612,7 +609,6 @@
    1.26    // Pop the stack before the safepoint code
    1.27    __ remove_frame(initial_frame_size_in_bytes());
    1.28  #ifndef _LP64
    1.29 -  //by aoqi
    1.30    __ lui(AT, Assembler::split_high((intptr_t)os::get_polling_page()
    1.31    + (SafepointPollOffset % os::vm_page_size())));
    1.32    __ relocate(relocInfo::poll_return_type);
    1.33 @@ -620,7 +616,6 @@
    1.34    + (SafepointPollOffset % os::vm_page_size())));
    1.35  #else
    1.36    #ifndef OPT_SAFEPOINT
    1.37 -  // do not know how to handle relocate yet. do not know li or li64 should be used neither. by aoqi. 20111207 FIXME.
    1.38    __ li48(AT, (intptr_t)os::get_polling_page() + (SafepointPollOffset % os::vm_page_size()));
    1.39    __ relocate(relocInfo::poll_return_type);
    1.40    __ lw(AT, AT, 0);
    1.41 @@ -635,25 +630,21 @@
    1.42    __ delayed()->nop();
    1.43  }
    1.44  
    1.45 -//read protect mem to R0 won't cause the exception only in godson-2e, So I modify R0 to AT .@jerome,11/25,2006
    1.46 +//read protect mem to R0 won't cause the exception only in godson-2e, So I modify R0 to AT.
    1.47  int LIR_Assembler::safepoint_poll(LIR_Opr tmp, CodeEmitInfo* info) {
    1.48    assert(info != NULL, "info must not be null for safepoint poll");
    1.49    int offset = __ offset();
    1.50    Register r = tmp->as_register();
    1.51  #ifndef _LP64
    1.52 -//by aoqi
    1.53    __ lui(r, Assembler::split_high((intptr_t)os::get_polling_page() + (SafepointPollOffset % os::vm_page_size())));
    1.54    add_debug_info_for_branch(info);
    1.55    __ relocate(relocInfo::poll_type);
    1.56    __ lw(AT, r, Assembler::split_low((intptr_t)os::get_polling_page() + (SafepointPollOffset % os::vm_page_size())));
    1.57  #else
    1.58    #ifndef OPT_SAFEPOINT
    1.59 -  // do not know how to handle relocate yet. do not know li or li64 should be used neither. by aoqi. 20111207 FIXME.
    1.60 -  //__ lui(r, Assembler::split_high((intptr_t)os::get_polling_page() + (SafepointPollOffset % os::vm_page_size())));
    1.61    __ li48(r, (intptr_t)os::get_polling_page() + (SafepointPollOffset % os::vm_page_size()));
    1.62    add_debug_info_for_branch(info);
    1.63    __ relocate(relocInfo::poll_type);
    1.64 -  //__ lw(AT, r, Assembler::split_low((intptr_t)os::get_polling_page() + (SafepointPollOffset % os::vm_page_size())));
    1.65    __ lw(AT, r, 0);
    1.66    #else
    1.67    __ lui(r, Assembler::split_high((intptr_t)os::get_polling_page() + (SafepointPollOffset % os::vm_page_size())));
    1.68 @@ -745,7 +736,6 @@
    1.69        if (dest->is_single_fpu()) {
    1.70          __ relocate(relocInfo::internal_pc_type);
    1.71  #ifndef _LP64
    1.72 -        //by_css
    1.73          __ lui(AT, Assembler::split_high((int)const_addr));
    1.74          __ addiu(AT, AT, Assembler::split_low((int)const_addr));
    1.75  #else
    1.76 @@ -759,7 +749,6 @@
    1.77  
    1.78          __ relocate(relocInfo::internal_pc_type);
    1.79  #ifndef _LP64
    1.80 -        //by_css
    1.81          __ lui(AT, Assembler::split_high((int)const_addr));
    1.82          __ addiu(AT, AT, Assembler::split_low((int)const_addr));
    1.83  #else
    1.84 @@ -777,7 +766,6 @@
    1.85        if (dest->is_double_fpu()) {
    1.86          __ relocate(relocInfo::internal_pc_type);
    1.87  #ifndef _LP64
    1.88 -        //by_css
    1.89          __ lui(AT, Assembler::split_high((int)const_addr));
    1.90          __ addiu(AT, AT, Assembler::split_low((int)const_addr));
    1.91          __ lwc1(dest->as_double_reg(), AT, 0);
    1.92 @@ -792,7 +780,6 @@
    1.93  
    1.94          __ relocate(relocInfo::internal_pc_type);
    1.95  #ifndef _LP64
    1.96 -        //by_css
    1.97          __ lui(AT, Assembler::split_high((int)const_addr));
    1.98          __ addiu(AT, AT, Assembler::split_low((int)const_addr));
    1.99          __ lw(dest->as_register_lo(), AT, 0);
   1.100 @@ -838,7 +825,6 @@
   1.101          RelocationHolder rspec = oop_Relocation::spec(oop_index);
   1.102          __ relocate(rspec);
   1.103  #ifndef _LP64
   1.104 -        //by_css
   1.105          __ lui(AT, Assembler::split_high((int)c->as_jobject()));
   1.106          __ addiu(AT, AT, Assembler::split_low((int)c->as_jobject()));
   1.107  #else
   1.108 @@ -971,7 +957,6 @@
   1.109      // int to int moves
   1.110      if (dest->is_single_cpu()) {
   1.111  #ifdef _LP64
   1.112 -//FIXME aoqi: copy from x86
   1.113        if (src->type() == T_LONG) {
   1.114          // Can do LONG -> OBJECT
   1.115          move_regs(src->as_register_lo(), dest->as_register());
   1.116 @@ -2482,13 +2467,11 @@
   1.117  
   1.118      } else {
   1.119        if (opr2->is_address()) {
   1.120 -        //FIXME. aoqi lw or ld_ptr?
   1.121          if (op->type() == T_INT)
   1.122            __ lw(AT, rebase_Address(opr2->pointer()->as_address()));
   1.123          else
   1.124            __ ld_ptr(AT, rebase_Address(opr2->pointer()->as_address()));
   1.125        } else if (opr2->is_stack()) {
   1.126 -        //FIXME. aoqi
   1.127          __ ld_ptr(AT, frame_map()->address_for_slot(opr2->single_stack_ix()));
   1.128        } else {
   1.129          ShouldNotReachHere();
   1.130 @@ -4017,7 +4000,6 @@
   1.131  
   1.132    case lir_mul:
   1.133  #ifndef _LP64
   1.134 -    //by aoqi
   1.135      __ mult(lreg, rreg);
   1.136  #else
   1.137      __ dmult(lreg, rreg);
   1.138 @@ -4081,7 +4063,6 @@
   1.139    case lir_mul:
   1.140      __ move(AT, c);
   1.141  #ifndef _LP64
   1.142 -    //by aoqi
   1.143      __ mult(lreg, AT);
   1.144  #else
   1.145      __ dmult(lreg, AT);
   1.146 @@ -4184,7 +4165,6 @@
   1.147      switch (code) {
   1.148        case lir_add:
   1.149  #ifndef _LP64
   1.150 -  //by aoqi
   1.151    __ addu(dst_lo, op1_lo, op2_lo);
   1.152    __ sltu(AT, dst_lo, op2_lo);
   1.153    __ addu(dst_hi, op1_hi, op2_hi);
   1.154 @@ -4196,7 +4176,6 @@
   1.155  
   1.156        case lir_sub:
   1.157  #ifndef _LP64
   1.158 -  //by aoqi
   1.159    __ subu(dst_lo, op1_lo, op2_lo);
   1.160    __ sltu(AT, op1_lo, dst_lo);
   1.161    __ subu(dst_hi, op1_hi, op2_hi);
   1.162 @@ -4210,7 +4189,6 @@
   1.163    {
   1.164  
   1.165  #ifndef _LP64
   1.166 -    //by aoqi
   1.167      Label zero, quick, done;
   1.168      //zero?
   1.169      __ orr(AT, op2_lo, op1_lo);
   1.170 @@ -4333,7 +4311,6 @@
   1.171        case lir_mul:
   1.172        case lir_mul_strictfp:
   1.173    // i dont think we need special handling of this. FIXME
   1.174 -  // by yjl 9/13/2005
   1.175    __ mul_d(res, lreg, rreg);
   1.176    break;
   1.177        case lir_div:
   1.178 @@ -4363,7 +4340,6 @@
   1.179        switch (code) {
   1.180    case lir_add:
   1.181  #ifndef _LP64
   1.182 -    //by aoqi
   1.183      __ lw(AT, laddr);
   1.184      __ add(AT, AT, rreg);
   1.185      __ sw(AT, laddr);
   1.186 @@ -4375,7 +4351,6 @@
   1.187      break;
   1.188    case lir_sub:
   1.189  #ifndef _LP64
   1.190 -    //by aoqi
   1.191      __ lw(AT, laddr);
   1.192      __ sub(AT,AT,rreg);
   1.193      __ sw(AT, laddr);
   1.194 @@ -4427,7 +4402,6 @@
   1.195  }
   1.196  
   1.197  void LIR_Assembler::intrinsic_op(LIR_Code code, LIR_Opr value, LIR_Opr unused, LIR_Opr dest, LIR_Op *op) {
   1.198 -//FIXME,lir_log, lir_log10,lir_abs,lir_sqrt,so many new lir instruction  @jerome
   1.199  if (value->is_double_fpu()) {
   1.200     // assert(value->fpu_regnrLo() == 0 && dest->fpu_regnrLo() == 0, "both must be on TOS");
   1.201      switch(code) {
   1.202 @@ -4586,7 +4560,6 @@
   1.203    }
   1.204  }
   1.205  
   1.206 -//done here. aoqi. 12-12 22:25
   1.207  // we assume that eax and edx can be overwritten
   1.208  void LIR_Assembler::arithmetic_idiv(LIR_Code code, LIR_Opr left, LIR_Opr right, LIR_Opr temp, LIR_Opr result, CodeEmitInfo* info) {
   1.209  
   1.210 @@ -5254,7 +5227,6 @@
   1.211    RelocationHolder rspec = oop_Relocation::spec(oop_index);
   1.212    __ relocate(rspec);
   1.213  #ifndef _LP64
   1.214 -  //by_css
   1.215    __ lui(AT, Assembler::split_high((int)o));
   1.216    __ addiu(AT, AT, Assembler::split_low((int)o));
   1.217  #else
   1.218 @@ -6021,7 +5993,6 @@
   1.219      // for classes that are not loaded yet, i.e., they will be
   1.220      // never GC'd
   1.221  #ifndef _LP64
   1.222 -//by_css
   1.223      __ lui(reg, Assembler::split_high((int)o));
   1.224      __ addiu(reg, reg, Assembler::split_low((int)o));
   1.225  #else
   1.226 @@ -6033,7 +6004,6 @@
   1.227      RelocationHolder rspec = oop_Relocation::spec(oop_index);
   1.228      __ relocate(rspec);
   1.229  #ifndef _LP64
   1.230 -//by_css
   1.231      __ lui(reg, Assembler::split_high((int)o));
   1.232      __ addiu(reg, reg, Assembler::split_low((int)o));
   1.233  #else

mercurial