< prev index next >

src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp

Print this page




 472   value.load_item();
 473   LIR_Opr reg = rlock_result(x);
 474   __ negate(value.result(), reg);
 475 }
 476 
 477 
 478 // for  _fadd, _fmul, _fsub, _fdiv, _frem
 479 //      _dadd, _dmul, _dsub, _ddiv, _drem
 480 void LIRGenerator::do_ArithmeticOp_FPU(ArithmeticOp* x) {
 481   address runtime_func;
 482   switch (x->op()) {
 483     case Bytecodes::_frem:
 484       runtime_func = CAST_FROM_FN_PTR(address, SharedRuntime::frem);
 485       break;
 486     case Bytecodes::_drem:
 487       runtime_func = CAST_FROM_FN_PTR(address, SharedRuntime::drem);
 488       break;
 489 #ifdef __SOFTFP__
 490     // Call function compiled with -msoft-float.
 491 
 492       // __aeabi_XXXX_glibc: Imported code from glibc soft-fp bundle for calculation accuracy improvement. See CR 6757269.

 493 
 494     case Bytecodes::_fadd:
 495       runtime_func = CAST_FROM_FN_PTR(address, __aeabi_fadd_glibc);
 496       break;
 497     case Bytecodes::_fmul:
 498       runtime_func = CAST_FROM_FN_PTR(address, __aeabi_fmul);
 499       break;
 500     case Bytecodes::_fsub:
 501       runtime_func = CAST_FROM_FN_PTR(address, __aeabi_fsub_glibc);
 502       break;
 503     case Bytecodes::_fdiv:
 504       runtime_func = CAST_FROM_FN_PTR(address, __aeabi_fdiv);
 505       break;
 506     case Bytecodes::_dadd:
 507       runtime_func = CAST_FROM_FN_PTR(address, __aeabi_dadd_glibc);
 508       break;
 509     case Bytecodes::_dmul:
 510       runtime_func = CAST_FROM_FN_PTR(address, __aeabi_dmul);
 511       break;
 512     case Bytecodes::_dsub:
 513       runtime_func = CAST_FROM_FN_PTR(address, __aeabi_dsub_glibc);
 514       break;
 515     case Bytecodes::_ddiv:
 516       runtime_func = CAST_FROM_FN_PTR(address, __aeabi_ddiv);
 517       break;
 518     default:
 519       ShouldNotReachHere();
 520 #else // __SOFTFP__
 521     default: {
 522       LIRItem left(x->x(), this);
 523       LIRItem right(x->y(), this);
 524       left.load_item();
 525       right.load_item();
 526       rlock_result(x);
 527       arithmetic_op_fpu(x->op(), x->operand(), left.result(), right.result(), x->is_strictfp());
 528       return;
 529     }
 530 #endif // __SOFTFP__
 531   }
 532 
 533   LIR_Opr result = call_runtime(x->x(), x->y(), runtime_func, x->type(), NULL);




 472   value.load_item();
 473   LIR_Opr reg = rlock_result(x);
 474   __ negate(value.result(), reg);
 475 }
 476 
 477 
 478 // for  _fadd, _fmul, _fsub, _fdiv, _frem
 479 //      _dadd, _dmul, _dsub, _ddiv, _drem
 480 void LIRGenerator::do_ArithmeticOp_FPU(ArithmeticOp* x) {
 481   address runtime_func;
 482   switch (x->op()) {
 483     case Bytecodes::_frem:
 484       runtime_func = CAST_FROM_FN_PTR(address, SharedRuntime::frem);
 485       break;
 486     case Bytecodes::_drem:
 487       runtime_func = CAST_FROM_FN_PTR(address, SharedRuntime::drem);
 488       break;
 489 #ifdef __SOFTFP__
 490     // Call function compiled with -msoft-float.
 491 
 492       // __aeabi_XXXX_extlib: Optional wrapper around SoftFloat-3e
 493       // for calculation accuracy improvement. See CR 6757269, JDK-8215902.
 494 
 495     case Bytecodes::_fadd:
 496       runtime_func = CAST_FROM_FN_PTR(address, __aeabi_fadd_extlib);
 497       break;
 498     case Bytecodes::_fmul:
 499       runtime_func = CAST_FROM_FN_PTR(address, __aeabi_fmul);
 500       break;
 501     case Bytecodes::_fsub:
 502       runtime_func = CAST_FROM_FN_PTR(address, __aeabi_fsub_extlib);
 503       break;
 504     case Bytecodes::_fdiv:
 505       runtime_func = CAST_FROM_FN_PTR(address, __aeabi_fdiv);
 506       break;
 507     case Bytecodes::_dadd:
 508       runtime_func = CAST_FROM_FN_PTR(address, __aeabi_dadd_extlib);
 509       break;
 510     case Bytecodes::_dmul:
 511       runtime_func = CAST_FROM_FN_PTR(address, __aeabi_dmul);
 512       break;
 513     case Bytecodes::_dsub:
 514       runtime_func = CAST_FROM_FN_PTR(address, __aeabi_dsub_extlib);
 515       break;
 516     case Bytecodes::_ddiv:
 517       runtime_func = CAST_FROM_FN_PTR(address, __aeabi_ddiv);
 518       break;
 519     default:
 520       ShouldNotReachHere();
 521 #else // __SOFTFP__
 522     default: {
 523       LIRItem left(x->x(), this);
 524       LIRItem right(x->y(), this);
 525       left.load_item();
 526       right.load_item();
 527       rlock_result(x);
 528       arithmetic_op_fpu(x->op(), x->operand(), left.result(), right.result(), x->is_strictfp());
 529       return;
 530     }
 531 #endif // __SOFTFP__
 532   }
 533 
 534   LIR_Opr result = call_runtime(x->x(), x->y(), runtime_func, x->type(), NULL);


< prev index next >