392 NegFNode( Node *in1 ) : NegNode(in1) {} 393 virtual int Opcode() const; 394 const Type *bottom_type() const { return Type::FLOAT; } 395 virtual uint ideal_reg() const { return Op_RegF; } 396 }; 397 398 //------------------------------NegDNode--------------------------------------- 399 // Negate value a double. Negating 0.0 returns -0.0, but subtracting from 400 // zero returns +0.0 (per JVM spec on 'dneg' bytecode). As subtraction 401 // cannot be used to replace negation we have to implement negation as ideal 402 // node; note that negation and addition can replace subtraction. 403 class NegDNode : public NegNode { 404 public: 405 NegDNode( Node *in1 ) : NegNode(in1) {} 406 virtual int Opcode() const; 407 const Type *bottom_type() const { return Type::DOUBLE; } 408 virtual uint ideal_reg() const { return Op_RegD; } 409 }; 410 411 //------------------------------CosDNode--------------------------------------- 412 // Cosinus of a double 413 class CosDNode : public Node { 414 public: 415 CosDNode(Compile* C, Node *c, Node *in1) : Node(c, in1) { 416 init_flags(Flag_is_expensive); 417 C->add_expensive_node(this); 418 } 419 virtual int Opcode() const; 420 const Type *bottom_type() const { return Type::DOUBLE; } 421 virtual uint ideal_reg() const { return Op_RegD; } 422 virtual const Type *Value( PhaseTransform *phase ) const; 423 }; 424 425 //------------------------------CosDNode--------------------------------------- 426 // Sinus of a double 427 class SinDNode : public Node { 428 public: 429 SinDNode(Compile* C, Node *c, Node *in1) : Node(c, in1) { 430 init_flags(Flag_is_expensive); 431 C->add_expensive_node(this); 432 } 433 virtual int Opcode() const; 434 const Type *bottom_type() const { return Type::DOUBLE; } 435 virtual uint ideal_reg() const { return Op_RegD; } 436 virtual const Type *Value( PhaseTransform *phase ) const; 437 }; 438 439 440 //------------------------------TanDNode--------------------------------------- 441 // tangens of a double 442 class TanDNode : public Node { 443 public: 444 TanDNode(Compile* C, Node *c,Node *in1) : Node(c, in1) { 445 init_flags(Flag_is_expensive); | 392 NegFNode( Node *in1 ) : NegNode(in1) {} 393 virtual int Opcode() const; 394 const Type *bottom_type() const { return Type::FLOAT; } 395 virtual uint ideal_reg() const { return Op_RegF; } 396 }; 397 398 //------------------------------NegDNode--------------------------------------- 399 // Negate value a double. Negating 0.0 returns -0.0, but subtracting from 400 // zero returns +0.0 (per JVM spec on 'dneg' bytecode). As subtraction 401 // cannot be used to replace negation we have to implement negation as ideal 402 // node; note that negation and addition can replace subtraction. 403 class NegDNode : public NegNode { 404 public: 405 NegDNode( Node *in1 ) : NegNode(in1) {} 406 virtual int Opcode() const; 407 const Type *bottom_type() const { return Type::DOUBLE; } 408 virtual uint ideal_reg() const { return Op_RegD; } 409 }; 410 411 //------------------------------CosDNode--------------------------------------- 412 // Sinus of a double 413 class SinDNode : public Node { 414 public: 415 SinDNode(Compile* C, Node *c, Node *in1) : Node(c, in1) { 416 init_flags(Flag_is_expensive); 417 C->add_expensive_node(this); 418 } 419 virtual int Opcode() const; 420 const Type *bottom_type() const { return Type::DOUBLE; } 421 virtual uint ideal_reg() const { return Op_RegD; } 422 virtual const Type *Value( PhaseTransform *phase ) const; 423 }; 424 425 426 //------------------------------TanDNode--------------------------------------- 427 // tangens of a double 428 class TanDNode : public Node { 429 public: 430 TanDNode(Compile* C, Node *c,Node *in1) : Node(c, in1) { 431 init_flags(Flag_is_expensive); |