src/share/vm/c1/c1_LinearScan.cpp

changeset 1
2d8a650513c2
parent 0
f90c822e73f8
child 6876
710a3c8b516e
     1.1 --- a/src/share/vm/c1/c1_LinearScan.cpp	Wed Apr 27 01:25:04 2016 +0800
     1.2 +++ b/src/share/vm/c1/c1_LinearScan.cpp	Fri Apr 29 00:06:10 2016 +0800
     1.3 @@ -22,6 +22,12 @@
     1.4   *
     1.5   */
     1.6  
     1.7 +/*
     1.8 + * This file has been modified by Loongson Technology in 2015. These
     1.9 + * modifications are Copyright (c) 2015 Loongson Technology, and are made
    1.10 + * available on the same license terms set forth above.
    1.11 + */
    1.12 +
    1.13  #include "precompiled.hpp"
    1.14  #include "c1/c1_CFGPrinter.hpp"
    1.15  #include "c1/c1_CodeStubs.hpp"
    1.16 @@ -35,6 +41,9 @@
    1.17  #ifdef TARGET_ARCH_x86
    1.18  # include "vmreg_x86.inline.hpp"
    1.19  #endif
    1.20 +#ifdef TARGET_ARCH_mips
    1.21 +# include "vmreg_mips.inline.hpp"
    1.22 +#endif
    1.23  #ifdef TARGET_ARCH_sparc
    1.24  # include "vmreg_sparc.inline.hpp"
    1.25  #endif
    1.26 @@ -6228,6 +6237,7 @@
    1.27  
    1.28              if (prev_branch->stub() == NULL) {
    1.29  
    1.30 +#ifndef MIPS64  //MIPS64 not support lir_cmp. same as openjdk6.
    1.31                LIR_Op2* prev_cmp = NULL;
    1.32  
    1.33                for(int j = instructions->length() - 3; j >= 0 && prev_cmp == NULL; j--) {
    1.34 @@ -6239,6 +6249,7 @@
    1.35                  }
    1.36                }
    1.37                assert(prev_cmp != NULL, "should have found comp instruction for branch");
    1.38 +#endif
    1.39                if (prev_branch->block() == code->at(i + 1) && prev_branch->info() == NULL) {
    1.40  
    1.41                  TRACE_LINEAR_SCAN(3, tty->print_cr("Negating conditional branch and deleting unconditional branch at end of block B%d", block->block_id()));
    1.42 @@ -6246,7 +6257,9 @@
    1.43                  // eliminate a conditional branch to the immediate successor
    1.44                  prev_branch->change_block(last_branch->block());
    1.45                  prev_branch->negate_cond();
    1.46 +#ifndef MIPS64 //MIPS64 not support lir_cmp. same as openjdk6.
    1.47                  prev_cmp->set_condition(prev_branch->cond());
    1.48 +#endif
    1.49                  instructions->truncate(instructions->length() - 1);
    1.50                }
    1.51              }
    1.52 @@ -6554,8 +6567,10 @@
    1.53            break;
    1.54          }
    1.55  
    1.56 +#ifndef MIPS64
    1.57          case lir_cmp:             inc_counter(counter_cmp); break;
    1.58  
    1.59 +#endif
    1.60          case lir_branch:
    1.61          case lir_cond_float_branch: {
    1.62            LIR_OpBranch* branch = op->as_OpBranch();

mercurial