1470 const Type *t1 = phase->type( in(1) ); 1471 if( t1 == Type::TOP ) return Type::TOP; 1472 if( t1->base() != Type::DoubleCon ) return Type::DOUBLE; 1473 double d = t1->getd(); 1474 return TypeD::make( StubRoutines::intrinsic_log( d ) ); 1475 } 1476 1477 //============================================================================= 1478 //------------------------------Value------------------------------------------ 1479 // Compute log10 1480 const Type *Log10DNode::Value( PhaseTransform *phase ) const { 1481 const Type *t1 = phase->type( in(1) ); 1482 if( t1 == Type::TOP ) return Type::TOP; 1483 if( t1->base() != Type::DoubleCon ) return Type::DOUBLE; 1484 double d = t1->getd(); 1485 return TypeD::make( StubRoutines::intrinsic_log10( d ) ); 1486 } 1487 1488 //============================================================================= 1489 //------------------------------Value------------------------------------------ 1490 // Compute exp 1491 const Type *ExpDNode::Value( PhaseTransform *phase ) const { 1492 const Type *t1 = phase->type( in(1) ); 1493 if( t1 == Type::TOP ) return Type::TOP; 1494 if( t1->base() != Type::DoubleCon ) return Type::DOUBLE; 1495 double d = t1->getd(); 1496 return TypeD::make( StubRoutines::intrinsic_exp( d ) ); 1497 } 1498 1499 1500 //============================================================================= 1501 //------------------------------Value------------------------------------------ 1502 // Compute pow 1503 const Type *PowDNode::Value( PhaseTransform *phase ) const { 1504 const Type *t1 = phase->type( in(1) ); 1505 if( t1 == Type::TOP ) return Type::TOP; 1506 if( t1->base() != Type::DoubleCon ) return Type::DOUBLE; 1507 const Type *t2 = phase->type( in(2) ); 1508 if( t2 == Type::TOP ) return Type::TOP; 1509 if( t2->base() != Type::DoubleCon ) return Type::DOUBLE; 1510 double d1 = t1->getd(); 1511 double d2 = t2->getd(); 1512 return TypeD::make( StubRoutines::intrinsic_pow( d1, d2 ) ); 1513 } | 1470 const Type *t1 = phase->type( in(1) ); 1471 if( t1 == Type::TOP ) return Type::TOP; 1472 if( t1->base() != Type::DoubleCon ) return Type::DOUBLE; 1473 double d = t1->getd(); 1474 return TypeD::make( StubRoutines::intrinsic_log( d ) ); 1475 } 1476 1477 //============================================================================= 1478 //------------------------------Value------------------------------------------ 1479 // Compute log10 1480 const Type *Log10DNode::Value( PhaseTransform *phase ) const { 1481 const Type *t1 = phase->type( in(1) ); 1482 if( t1 == Type::TOP ) return Type::TOP; 1483 if( t1->base() != Type::DoubleCon ) return Type::DOUBLE; 1484 double d = t1->getd(); 1485 return TypeD::make( StubRoutines::intrinsic_log10( d ) ); 1486 } 1487 1488 //============================================================================= 1489 //------------------------------Value------------------------------------------ 1490 // Compute pow 1491 const Type *PowDNode::Value( PhaseTransform *phase ) const { 1492 const Type *t1 = phase->type( in(1) ); 1493 if( t1 == Type::TOP ) return Type::TOP; 1494 if( t1->base() != Type::DoubleCon ) return Type::DOUBLE; 1495 const Type *t2 = phase->type( in(2) ); 1496 if( t2 == Type::TOP ) return Type::TOP; 1497 if( t2->base() != Type::DoubleCon ) return Type::DOUBLE; 1498 double d1 = t1->getd(); 1499 double d2 = t2->getd(); 1500 return TypeD::make( StubRoutines::intrinsic_pow( d1, d2 ) ); 1501 } |