src/share/vm/c1/c1_LIR.cpp

changeset 3787
6759698e3140
parent 3592
701a83c86f28
child 4037
da91efe96a93
     1.1 --- a/src/share/vm/c1/c1_LIR.cpp	Mon May 14 09:36:00 2012 -0700
     1.2 +++ b/src/share/vm/c1/c1_LIR.cpp	Tue May 15 10:10:23 2012 +0200
     1.3 @@ -624,11 +624,13 @@
     1.4      {
     1.5        assert(op->as_Op2() != NULL, "must be");
     1.6        LIR_Op2* op2 = (LIR_Op2*)op;
     1.7 +      assert(op2->_tmp2->is_illegal() && op2->_tmp3->is_illegal() &&
     1.8 +             op2->_tmp4->is_illegal() && op2->_tmp5->is_illegal(), "not used");
     1.9  
    1.10        if (op2->_info)                     do_info(op2->_info);
    1.11        if (op2->_opr1->is_valid())         do_input(op2->_opr1);
    1.12        if (op2->_opr2->is_valid())         do_input(op2->_opr2);
    1.13 -      if (op2->_tmp->is_valid())          do_temp(op2->_tmp);
    1.14 +      if (op2->_tmp1->is_valid())         do_temp(op2->_tmp1);
    1.15        if (op2->_result->is_valid())       do_output(op2->_result);
    1.16  
    1.17        break;
    1.18 @@ -641,7 +643,8 @@
    1.19        assert(op->as_Op2() != NULL, "must be");
    1.20        LIR_Op2* op2 = (LIR_Op2*)op;
    1.21  
    1.22 -      assert(op2->_info == NULL && op2->_tmp->is_illegal(), "not used");
    1.23 +      assert(op2->_info == NULL && op2->_tmp1->is_illegal() && op2->_tmp2->is_illegal() &&
    1.24 +             op2->_tmp3->is_illegal() && op2->_tmp4->is_illegal() && op2->_tmp5->is_illegal(), "not used");
    1.25        assert(op2->_opr1->is_valid() && op2->_opr2->is_valid() && op2->_result->is_valid(), "used");
    1.26  
    1.27        do_input(op2->_opr1);
    1.28 @@ -665,10 +668,12 @@
    1.29        assert(op2->_opr1->is_valid(), "used");
    1.30        assert(op2->_opr2->is_valid(), "used");
    1.31        assert(op2->_result->is_valid(), "used");
    1.32 +      assert(op2->_tmp2->is_illegal() && op2->_tmp3->is_illegal() &&
    1.33 +             op2->_tmp4->is_illegal() && op2->_tmp5->is_illegal(), "not used");
    1.34  
    1.35        do_input(op2->_opr1); do_temp(op2->_opr1);
    1.36        do_input(op2->_opr2); do_temp(op2->_opr2);
    1.37 -      if (op2->_tmp->is_valid()) do_temp(op2->_tmp);
    1.38 +      if (op2->_tmp1->is_valid()) do_temp(op2->_tmp1);
    1.39        do_output(op2->_result);
    1.40  
    1.41        break;
    1.42 @@ -682,6 +687,8 @@
    1.43        if (op2->_opr1->is_valid())         do_temp(op2->_opr1);
    1.44        if (op2->_opr2->is_valid())         do_input(op2->_opr2); // exception object is input parameter
    1.45        assert(op2->_result->is_illegal(), "no result");
    1.46 +      assert(op2->_tmp2->is_illegal() && op2->_tmp3->is_illegal() &&
    1.47 +             op2->_tmp4->is_illegal() && op2->_tmp5->is_illegal(), "not used");
    1.48  
    1.49        break;
    1.50      }
    1.51 @@ -702,7 +709,8 @@
    1.52      case lir_sin:
    1.53      case lir_cos:
    1.54      case lir_log:
    1.55 -    case lir_log10: {
    1.56 +    case lir_log10:
    1.57 +    case lir_exp: {
    1.58        assert(op->as_Op2() != NULL, "must be");
    1.59        LIR_Op2* op2 = (LIR_Op2*)op;
    1.60  
    1.61 @@ -711,16 +719,47 @@
    1.62        // Register input operand as temp to guarantee that it doesn't
    1.63        // overlap with the input.
    1.64        assert(op2->_info == NULL, "not used");
    1.65 +      assert(op2->_tmp5->is_illegal(), "not used");
    1.66 +      assert(op2->_tmp2->is_valid() == (op->code() == lir_exp), "not used");
    1.67 +      assert(op2->_tmp3->is_valid() == (op->code() == lir_exp), "not used");
    1.68 +      assert(op2->_tmp4->is_valid() == (op->code() == lir_exp), "not used");
    1.69        assert(op2->_opr1->is_valid(), "used");
    1.70        do_input(op2->_opr1); do_temp(op2->_opr1);
    1.71  
    1.72        if (op2->_opr2->is_valid())         do_temp(op2->_opr2);
    1.73 -      if (op2->_tmp->is_valid())          do_temp(op2->_tmp);
    1.74 +      if (op2->_tmp1->is_valid())         do_temp(op2->_tmp1);
    1.75 +      if (op2->_tmp2->is_valid())         do_temp(op2->_tmp2);
    1.76 +      if (op2->_tmp3->is_valid())         do_temp(op2->_tmp3);
    1.77 +      if (op2->_tmp4->is_valid())         do_temp(op2->_tmp4);
    1.78        if (op2->_result->is_valid())       do_output(op2->_result);
    1.79  
    1.80        break;
    1.81      }
    1.82  
    1.83 +    case lir_pow: {
    1.84 +      assert(op->as_Op2() != NULL, "must be");
    1.85 +      LIR_Op2* op2 = (LIR_Op2*)op;
    1.86 +
    1.87 +      // On x86 pow needs two temporary fpu stack slots: tmp1 and
    1.88 +      // tmp2. Register input operands as temps to guarantee that it
    1.89 +      // doesn't overlap with the temporary slots.
    1.90 +      assert(op2->_info == NULL, "not used");
    1.91 +      assert(op2->_opr1->is_valid() && op2->_opr2->is_valid(), "used");
    1.92 +      assert(op2->_tmp1->is_valid() && op2->_tmp2->is_valid() && op2->_tmp3->is_valid()
    1.93 +             && op2->_tmp4->is_valid() && op2->_tmp5->is_valid(), "used");
    1.94 +      assert(op2->_result->is_valid(), "used");
    1.95 +
    1.96 +      do_input(op2->_opr1); do_temp(op2->_opr1);
    1.97 +      do_input(op2->_opr2); do_temp(op2->_opr2);
    1.98 +      do_temp(op2->_tmp1);
    1.99 +      do_temp(op2->_tmp2);
   1.100 +      do_temp(op2->_tmp3);
   1.101 +      do_temp(op2->_tmp4);
   1.102 +      do_temp(op2->_tmp5);
   1.103 +      do_output(op2->_result);
   1.104 +
   1.105 +      break;
   1.106 +    }
   1.107  
   1.108  // LIR_Op3
   1.109      case lir_idiv:
   1.110 @@ -1670,6 +1709,8 @@
   1.111       case lir_tan:                   s = "tan";           break;
   1.112       case lir_log:                   s = "log";           break;
   1.113       case lir_log10:                 s = "log10";         break;
   1.114 +     case lir_exp:                   s = "exp";           break;
   1.115 +     case lir_pow:                   s = "pow";           break;
   1.116       case lir_logic_and:             s = "logic_and";     break;
   1.117       case lir_logic_or:              s = "logic_or";      break;
   1.118       case lir_logic_xor:             s = "logic_xor";     break;
   1.119 @@ -1892,7 +1933,11 @@
   1.120    }
   1.121    in_opr1()->print(out);    out->print(" ");
   1.122    in_opr2()->print(out);    out->print(" ");
   1.123 -  if (tmp_opr()->is_valid()) { tmp_opr()->print(out);    out->print(" "); }
   1.124 +  if (tmp1_opr()->is_valid()) { tmp1_opr()->print(out);    out->print(" "); }
   1.125 +  if (tmp2_opr()->is_valid()) { tmp2_opr()->print(out);    out->print(" "); }
   1.126 +  if (tmp3_opr()->is_valid()) { tmp3_opr()->print(out);    out->print(" "); }
   1.127 +  if (tmp4_opr()->is_valid()) { tmp4_opr()->print(out);    out->print(" "); }
   1.128 +  if (tmp5_opr()->is_valid()) { tmp5_opr()->print(out);    out->print(" "); }
   1.129    result_opr()->print(out);
   1.130  }
   1.131  

mercurial