< prev index next >

src/share/vm/c1/c1_LIRGenerator.cpp

Print this page
rev 12113 : 8166561: [s390] Adaptions needed for s390 port in C1 and C2.


 589   }
 590 }
 591 
 592 
 593 void LIRGenerator::arithmetic_op_int(Bytecodes::Code code, LIR_Opr result, LIR_Opr left, LIR_Opr right, LIR_Opr tmp) {
 594   arithmetic_op(code, result, left, right, false, tmp);
 595 }
 596 
 597 
 598 void LIRGenerator::arithmetic_op_long(Bytecodes::Code code, LIR_Opr result, LIR_Opr left, LIR_Opr right, CodeEmitInfo* info) {
 599   arithmetic_op(code, result, left, right, false, LIR_OprFact::illegalOpr, info);
 600 }
 601 
 602 
 603 void LIRGenerator::arithmetic_op_fpu(Bytecodes::Code code, LIR_Opr result, LIR_Opr left, LIR_Opr right, bool is_strictfp, LIR_Opr tmp) {
 604   arithmetic_op(code, result, left, right, is_strictfp, tmp);
 605 }
 606 
 607 
 608 void LIRGenerator::shift_op(Bytecodes::Code code, LIR_Opr result_op, LIR_Opr value, LIR_Opr count, LIR_Opr tmp) {
 609   if (TwoOperandLIRForm && value != result_op) {



 610     assert(count != result_op, "malformed");
 611     __ move(value, result_op);
 612     value = result_op;
 613   }
 614 
 615   assert(count->is_constant() || count->is_register(), "must be");
 616   switch(code) {
 617   case Bytecodes::_ishl:
 618   case Bytecodes::_lshl: __ shift_left(value, count, result_op, tmp); break;
 619   case Bytecodes::_ishr:
 620   case Bytecodes::_lshr: __ shift_right(value, count, result_op, tmp); break;
 621   case Bytecodes::_iushr:
 622   case Bytecodes::_lushr: __ unsigned_shift_right(value, count, result_op, tmp); break;
 623   default: ShouldNotReachHere();
 624   }
 625 }
 626 
 627 
 628 void LIRGenerator::logic_op (Bytecodes::Code code, LIR_Opr result_op, LIR_Opr left_op, LIR_Opr right_op) {
 629   if (TwoOperandLIRForm && left_op != result_op) {




 589   }
 590 }
 591 
 592 
 593 void LIRGenerator::arithmetic_op_int(Bytecodes::Code code, LIR_Opr result, LIR_Opr left, LIR_Opr right, LIR_Opr tmp) {
 594   arithmetic_op(code, result, left, right, false, tmp);
 595 }
 596 
 597 
 598 void LIRGenerator::arithmetic_op_long(Bytecodes::Code code, LIR_Opr result, LIR_Opr left, LIR_Opr right, CodeEmitInfo* info) {
 599   arithmetic_op(code, result, left, right, false, LIR_OprFact::illegalOpr, info);
 600 }
 601 
 602 
 603 void LIRGenerator::arithmetic_op_fpu(Bytecodes::Code code, LIR_Opr result, LIR_Opr left, LIR_Opr right, bool is_strictfp, LIR_Opr tmp) {
 604   arithmetic_op(code, result, left, right, is_strictfp, tmp);
 605 }
 606 
 607 
 608 void LIRGenerator::shift_op(Bytecodes::Code code, LIR_Opr result_op, LIR_Opr value, LIR_Opr count, LIR_Opr tmp) {
 609 
 610   if (TwoOperandLIRForm && value != result_op
 611       // Only 32bit right shifts require two operand form on S390.
 612       S390_ONLY(&& (code == Bytecodes::_ishr || code == Bytecodes::_iushr))) {
 613     assert(count != result_op, "malformed");
 614     __ move(value, result_op);
 615     value = result_op;
 616   }
 617 
 618   assert(count->is_constant() || count->is_register(), "must be");
 619   switch(code) {
 620   case Bytecodes::_ishl:
 621   case Bytecodes::_lshl: __ shift_left(value, count, result_op, tmp); break;
 622   case Bytecodes::_ishr:
 623   case Bytecodes::_lshr: __ shift_right(value, count, result_op, tmp); break;
 624   case Bytecodes::_iushr:
 625   case Bytecodes::_lushr: __ unsigned_shift_right(value, count, result_op, tmp); break;
 626   default: ShouldNotReachHere();
 627   }
 628 }
 629 
 630 
 631 void LIRGenerator::logic_op (Bytecodes::Code code, LIR_Opr result_op, LIR_Opr left_op, LIR_Opr right_op) {
 632   if (TwoOperandLIRForm && left_op != result_op) {


< prev index next >