391 public: 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 //------------------------------TanDNode--------------------------------------- 412 // tangens of a double 413 class TanDNode : public Node { 414 public: 415 TanDNode(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(PhaseGVN* phase) const; 423 }; 424 425 426 //------------------------------AtanDNode-------------------------------------- 427 // arcus tangens of a double 428 class AtanDNode : public Node { 429 public: 430 AtanDNode(Node *c, Node *in1, Node *in2 ) : Node(c, in1, in2) {} 431 virtual int Opcode() const; 432 const Type *bottom_type() const { return Type::DOUBLE; } 433 virtual uint ideal_reg() const { return Op_RegD; } 434 }; 435 436 437 //------------------------------SqrtDNode-------------------------------------- 438 // square root a double 439 class SqrtDNode : public Node { 440 public: 441 SqrtDNode(Compile* C, Node *c, Node *in1) : Node(c, in1) { 442 init_flags(Flag_is_expensive); 443 C->add_expensive_node(this); 444 } 445 virtual int Opcode() const; 446 const Type *bottom_type() const { return Type::DOUBLE; } 447 virtual uint ideal_reg() const { return Op_RegD; } 448 virtual const Type* Value(PhaseGVN* phase) const; 449 }; 450 451 //------------------------------Log10DNode--------------------------------------- 452 // Log_10 of a double 453 class Log10DNode : public Node { 454 public: 455 Log10DNode(Compile* C, Node *c, Node *in1) : Node(c, in1) { 456 init_flags(Flag_is_expensive); 457 C->add_expensive_node(this); 458 } 459 virtual int Opcode() const; 460 const Type *bottom_type() const { return Type::DOUBLE; } 461 virtual uint ideal_reg() const { return Op_RegD; } 462 virtual const Type* Value(PhaseGVN* phase) const; 463 }; 464 465 //-------------------------------ReverseBytesINode-------------------------------- 466 // reverse bytes of an integer 467 class ReverseBytesINode : public Node { 468 public: 469 ReverseBytesINode(Node *c, Node *in1) : Node(c, in1) {} 470 virtual int Opcode() const; 471 const Type *bottom_type() const { return TypeInt::INT; } 472 virtual uint ideal_reg() const { return Op_RegI; } 473 }; 474 475 //-------------------------------ReverseBytesLNode-------------------------------- | 391 public: 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 //------------------------------AtanDNode-------------------------------------- 412 // arcus tangens of a double 413 class AtanDNode : public Node { 414 public: 415 AtanDNode(Node *c, Node *in1, Node *in2 ) : Node(c, in1, in2) {} 416 virtual int Opcode() const; 417 const Type *bottom_type() const { return Type::DOUBLE; } 418 virtual uint ideal_reg() const { return Op_RegD; } 419 }; 420 421 422 //------------------------------SqrtDNode-------------------------------------- 423 // square root a double 424 class SqrtDNode : public Node { 425 public: 426 SqrtDNode(Compile* C, Node *c, Node *in1) : Node(c, in1) { 427 init_flags(Flag_is_expensive); 428 C->add_expensive_node(this); 429 } 430 virtual int Opcode() const; 431 const Type *bottom_type() const { return Type::DOUBLE; } 432 virtual uint ideal_reg() const { return Op_RegD; } 433 virtual const Type* Value(PhaseGVN* phase) const; 434 }; 435 436 //-------------------------------ReverseBytesINode-------------------------------- 437 // reverse bytes of an integer 438 class ReverseBytesINode : public Node { 439 public: 440 ReverseBytesINode(Node *c, Node *in1) : Node(c, in1) {} 441 virtual int Opcode() const; 442 const Type *bottom_type() const { return TypeInt::INT; } 443 virtual uint ideal_reg() const { return Op_RegI; } 444 }; 445 446 //-------------------------------ReverseBytesLNode-------------------------------- |