273 virtual void negate(); |
273 virtual void negate(); |
274 |
274 |
275 // Apply peephole rule(s) to this instruction |
275 // Apply peephole rule(s) to this instruction |
276 virtual MachNode *peephole( Block *block, int block_index, PhaseRegAlloc *ra_, int &deleted, Compile* C ); |
276 virtual MachNode *peephole( Block *block, int block_index, PhaseRegAlloc *ra_, int &deleted, Compile* C ); |
277 |
277 |
278 // Check for PC-Relative addressing |
|
279 bool is_pc_relative() const { return (flags() & Flag_is_pc_relative) != 0; } |
|
280 |
|
281 // Top-level ideal Opcode matched |
278 // Top-level ideal Opcode matched |
282 virtual int ideal_Opcode() const { return Op_Node; } |
279 virtual int ideal_Opcode() const { return Op_Node; } |
283 |
280 |
284 // Set the branch inside jump MachNodes. Error for non-branch Nodes. |
281 // Set the branch inside jump MachNodes. Error for non-branch Nodes. |
285 virtual void label_set( Label* label, uint block_num ); |
282 virtual void label_set( Label* label, uint block_num ); |
523 class MachNullCheckNode : public MachIdealNode { |
520 class MachNullCheckNode : public MachIdealNode { |
524 public: |
521 public: |
525 const uint _vidx; // Index of memop being tested |
522 const uint _vidx; // Index of memop being tested |
526 MachNullCheckNode( Node *ctrl, Node *memop, uint vidx ) : MachIdealNode(), _vidx(vidx) { |
523 MachNullCheckNode( Node *ctrl, Node *memop, uint vidx ) : MachIdealNode(), _vidx(vidx) { |
527 init_class_id(Class_MachNullCheck); |
524 init_class_id(Class_MachNullCheck); |
528 init_flags(Flag_is_Branch | Flag_is_pc_relative); |
525 init_flags(Flag_is_Branch); |
529 add_req(ctrl); |
526 add_req(ctrl); |
530 add_req(memop); |
527 add_req(memop); |
531 } |
528 } |
532 |
529 |
533 virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const; |
530 virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const; |
552 // of the Matcher process, but the Matcher is ill suited to issues involving |
549 // of the Matcher process, but the Matcher is ill suited to issues involving |
553 // frame handling, so frame handling is all done in the Ideal world with |
550 // frame handling, so frame handling is all done in the Ideal world with |
554 // occasional callbacks to the machine model for important info. |
551 // occasional callbacks to the machine model for important info. |
555 class MachProjNode : public ProjNode { |
552 class MachProjNode : public ProjNode { |
556 public: |
553 public: |
557 MachProjNode( Node *multi, uint con, const RegMask &out, uint ideal_reg ) : ProjNode(multi,con), _rout(out), _ideal_reg(ideal_reg) {} |
554 MachProjNode( Node *multi, uint con, const RegMask &out, uint ideal_reg ) : ProjNode(multi,con), _rout(out), _ideal_reg(ideal_reg) { |
|
555 init_class_id(Class_MachProj); |
|
556 } |
558 RegMask _rout; |
557 RegMask _rout; |
559 const uint _ideal_reg; |
558 const uint _ideal_reg; |
560 enum projType { |
559 enum projType { |
561 unmatched_proj = 0, // Projs for Control, I/O, memory not matched |
560 unmatched_proj = 0, // Projs for Control, I/O, memory not matched |
562 fat_proj = 999 // Projs killing many regs, defined by _rout |
561 fat_proj = 999 // Projs killing many regs, defined by _rout |
587 #ifndef PRODUCT |
586 #ifndef PRODUCT |
588 virtual void dump_spec(outputStream *st) const; |
587 virtual void dump_spec(outputStream *st) const; |
589 #endif |
588 #endif |
590 }; |
589 }; |
591 |
590 |
|
591 //------------------------------MachGotoNode----------------------------------- |
|
592 // Machine-specific versions of GotoNodes |
|
593 class MachGotoNode : public MachNode { |
|
594 public: |
|
595 MachGotoNode() : MachNode() { |
|
596 init_class_id(Class_MachGoto); |
|
597 } |
|
598 }; |
|
599 |
592 //------------------------------MachFastLockNode------------------------------------- |
600 //------------------------------MachFastLockNode------------------------------------- |
593 // Machine-specific versions of FastLockNodes |
601 // Machine-specific versions of FastLockNodes |
594 class MachFastLockNode : public MachNode { |
602 class MachFastLockNode : public MachNode { |
595 virtual uint size_of() const { return sizeof(*this); } // Size is bigger |
603 virtual uint size_of() const { return sizeof(*this); } // Size is bigger |
596 public: |
604 public: |
629 OopMap* oop_map() const { return _oop_map; } |
637 OopMap* oop_map() const { return _oop_map; } |
630 void set_oop_map(OopMap* om) { _oop_map = om; } |
638 void set_oop_map(OopMap* om) { _oop_map = om; } |
631 |
639 |
632 MachSafePointNode() : MachReturnNode(), _oop_map(NULL), _jvms(NULL), _jvmadj(0) { |
640 MachSafePointNode() : MachReturnNode(), _oop_map(NULL), _jvms(NULL), _jvmadj(0) { |
633 init_class_id(Class_MachSafePoint); |
641 init_class_id(Class_MachSafePoint); |
634 init_flags(Flag_is_safepoint_node); |
|
635 } |
642 } |
636 |
643 |
637 virtual JVMState* jvms() const { return _jvms; } |
644 virtual JVMState* jvms() const { return _jvms; } |
638 void set_jvms(JVMState* s) { |
645 void set_jvms(JVMState* s) { |
639 _jvms = s; |
646 _jvms = s; |
640 } |
647 } |
641 bool is_safepoint_node() const { return (flags() & Flag_is_safepoint_node) != 0; } |
|
642 virtual const Type *bottom_type() const; |
648 virtual const Type *bottom_type() const; |
643 |
649 |
644 virtual const RegMask &in_RegMask(uint) const; |
650 virtual const RegMask &in_RegMask(uint) const; |
645 |
651 |
646 // Functionality from old debug nodes |
652 // Functionality from old debug nodes |
700 void set_cnt(float c) { _cnt = c; } |
706 void set_cnt(float c) { _cnt = c; } |
701 void set_argsize(int s) { _argsize = s; } |
707 void set_argsize(int s) { _argsize = s; } |
702 |
708 |
703 MachCallNode() : MachSafePointNode() { |
709 MachCallNode() : MachSafePointNode() { |
704 init_class_id(Class_MachCall); |
710 init_class_id(Class_MachCall); |
705 init_flags(Flag_is_Call); |
|
706 } |
711 } |
707 |
712 |
708 virtual const Type *bottom_type() const; |
713 virtual const Type *bottom_type() const; |
709 virtual bool pinned() const { return false; } |
714 virtual bool pinned() const { return false; } |
710 virtual const Type *Value( PhaseTransform *phase ) const; |
715 virtual const Type *Value( PhaseTransform *phase ) const; |