1297 const Type *t1 = phase->type( in(1) );
1298 if( t1 == Type::TOP ) return Type::TOP;
1299 if( t1->base() != Type::DoubleCon ) return Type::DOUBLE;
1300 double d = t1->getd();
1301 return TypeD::make( StubRoutines::intrinsic_exp( d ) );
1302 }
1303
1304
1305 //=============================================================================
1306 //------------------------------Value------------------------------------------
1307 // Compute pow
1308 const Type *PowDNode::Value( PhaseTransform *phase ) const {
1309 const Type *t1 = phase->type( in(1) );
1310 if( t1 == Type::TOP ) return Type::TOP;
1311 if( t1->base() != Type::DoubleCon ) return Type::DOUBLE;
1312 const Type *t2 = phase->type( in(2) );
1313 if( t2 == Type::TOP ) return Type::TOP;
1314 if( t2->base() != Type::DoubleCon ) return Type::DOUBLE;
1315 double d1 = t1->getd();
1316 double d2 = t2->getd();
1317 if( d1 < 0.0 ) return Type::DOUBLE;
1318 if( d2 < 0.0 ) return Type::DOUBLE;
1319 return TypeD::make( StubRoutines::intrinsic_pow( d1, d2 ) );
1320 }
|
1297 const Type *t1 = phase->type( in(1) );
1298 if( t1 == Type::TOP ) return Type::TOP;
1299 if( t1->base() != Type::DoubleCon ) return Type::DOUBLE;
1300 double d = t1->getd();
1301 return TypeD::make( StubRoutines::intrinsic_exp( d ) );
1302 }
1303
1304
1305 //=============================================================================
1306 //------------------------------Value------------------------------------------
1307 // Compute pow
1308 const Type *PowDNode::Value( PhaseTransform *phase ) const {
1309 const Type *t1 = phase->type( in(1) );
1310 if( t1 == Type::TOP ) return Type::TOP;
1311 if( t1->base() != Type::DoubleCon ) return Type::DOUBLE;
1312 const Type *t2 = phase->type( in(2) );
1313 if( t2 == Type::TOP ) return Type::TOP;
1314 if( t2->base() != Type::DoubleCon ) return Type::DOUBLE;
1315 double d1 = t1->getd();
1316 double d2 = t2->getd();
1317 return TypeD::make( StubRoutines::intrinsic_pow( d1, d2 ) );
1318 }
|