< prev index next >
src/hotspot/share/opto/type.cpp
Print this page
rev 53001 : 8212043: Add floating-point Math.min/max intrinsics
Summary: Floating-point Math.min() and Math.max() intrinsics are enabled on AArch64 platform
Reviewed-by: adinn, aph
@@ -443,13 +443,17 @@
BOTTOM = make(Bottom); // Everything
HALF = make(Half); // Placeholder half of doublewide type
TypeF::ZERO = TypeF::make(0.0); // Float 0 (positive zero)
TypeF::ONE = TypeF::make(1.0); // Float 1
+ TypeF::POS_INF = TypeF::make(1.0f/0.0f); // Float positive infinity
+ TypeF::NEG_INF = TypeF::make(-1.0f/0.0f); // Float negative infinity
TypeD::ZERO = TypeD::make(0.0); // Double 0 (positive zero)
TypeD::ONE = TypeD::make(1.0); // Double 1
+ TypeD::POS_INF = TypeD::make(1.0d/0.0d); // Double positive infinity
+ TypeD::NEG_INF = TypeD::make(-1.0d/0.0d); // Double negative infinity
TypeInt::MINUS_1 = TypeInt::make(-1); // -1
TypeInt::ZERO = TypeInt::make( 0); // 0
TypeInt::ONE = TypeInt::make( 1); // 1
TypeInt::BOOL = TypeInt::make(0,1, WidenMin); // 0 or 1, FALSE or TRUE.
@@ -1085,10 +1089,12 @@
//=============================================================================
// Convenience common pre-built types.
const TypeF *TypeF::ZERO; // Floating point zero
const TypeF *TypeF::ONE; // Floating point one
+const TypeF *TypeF::POS_INF; // Floating point positive infinity
+const TypeF *TypeF::NEG_INF; // Floating point negative infinity
//------------------------------make-------------------------------------------
// Create a float constant
const TypeF *TypeF::make(float f) {
return (TypeF*)(new TypeF(f))->hashcons();
@@ -1193,10 +1199,12 @@
//=============================================================================
// Convenience common pre-built types.
const TypeD *TypeD::ZERO; // Floating point zero
const TypeD *TypeD::ONE; // Floating point one
+const TypeD *TypeD::POS_INF; // Floating point positive infinity
+const TypeD *TypeD::NEG_INF; // Floating point negative infinity
//------------------------------make-------------------------------------------
const TypeD *TypeD::make(double d) {
return (TypeD*)(new TypeD(d))->hashcons();
}
< prev index next >