193 } |
193 } |
194 } |
194 } |
195 |
195 |
196 |
196 |
197 LIR_Opr LIRGenerator::load_immediate(int x, BasicType type) { |
197 LIR_Opr LIRGenerator::load_immediate(int x, BasicType type) { |
198 LIR_Opr r; |
198 LIR_Opr r = NULL; |
199 if (type == T_LONG) { |
199 if (type == T_LONG) { |
200 r = LIR_OprFact::longConst(x); |
200 r = LIR_OprFact::longConst(x); |
201 } else if (type == T_INT) { |
201 } else if (type == T_INT) { |
202 r = LIR_OprFact::intConst(x); |
202 r = LIR_OprFact::intConst(x); |
203 } else { |
203 } else { |
482 __ move(right.result(), cc->at(0)); |
482 __ move(right.result(), cc->at(0)); |
483 |
483 |
484 __ cmp(lir_cond_equal, right.result(), LIR_OprFact::longConst(0)); |
484 __ cmp(lir_cond_equal, right.result(), LIR_OprFact::longConst(0)); |
485 __ branch(lir_cond_equal, T_LONG, new DivByZeroStub(info)); |
485 __ branch(lir_cond_equal, T_LONG, new DivByZeroStub(info)); |
486 |
486 |
487 address entry; |
487 address entry = NULL; |
488 switch (x->op()) { |
488 switch (x->op()) { |
489 case Bytecodes::_lrem: |
489 case Bytecodes::_lrem: |
490 entry = CAST_FROM_FN_PTR(address, SharedRuntime::lrem); |
490 entry = CAST_FROM_FN_PTR(address, SharedRuntime::lrem); |
491 break; // check if dividend is 0 is done elsewhere |
491 break; // check if dividend is 0 is done elsewhere |
492 case Bytecodes::_ldiv: |
492 case Bytecodes::_ldiv: |
1022 } |
1022 } |
1023 } |
1023 } |
1024 |
1024 |
1025 void LIRGenerator::do_Convert(Convert* x) { |
1025 void LIRGenerator::do_Convert(Convert* x) { |
1026 // flags that vary for the different operations and different SSE-settings |
1026 // flags that vary for the different operations and different SSE-settings |
1027 bool fixed_input, fixed_result, round_result, needs_stub; |
1027 bool fixed_input = false, fixed_result = false, round_result = false, needs_stub = false; |
1028 |
1028 |
1029 switch (x->op()) { |
1029 switch (x->op()) { |
1030 case Bytecodes::_i2l: // fall through |
1030 case Bytecodes::_i2l: // fall through |
1031 case Bytecodes::_l2i: // fall through |
1031 case Bytecodes::_l2i: // fall through |
1032 case Bytecodes::_i2b: // fall through |
1032 case Bytecodes::_i2b: // fall through |