src/hotspot/share/opto/machnode.hpp
branchdatagramsocketimpl-branch
changeset 58678 9cf78a70fa4f
parent 55050 feba48c5dfb4
child 58679 9c3209ff7550
equal deleted inserted replaced
58677:13588c901957 58678:9cf78a70fa4f
   195 //------------------------------MachNode---------------------------------------
   195 //------------------------------MachNode---------------------------------------
   196 // Base type for all machine specific nodes.  All node classes generated by the
   196 // Base type for all machine specific nodes.  All node classes generated by the
   197 // ADLC inherit from this class.
   197 // ADLC inherit from this class.
   198 class MachNode : public Node {
   198 class MachNode : public Node {
   199 public:
   199 public:
   200   MachNode() : Node((uint)0), _num_opnds(0), _opnds(NULL) {
   200   MachNode() : Node((uint)0), _barrier(0), _num_opnds(0), _opnds(NULL) {
   201     init_class_id(Class_Mach);
   201     init_class_id(Class_Mach);
   202   }
   202   }
   203   // Required boilerplate
   203   // Required boilerplate
   204   virtual uint size_of() const { return sizeof(MachNode); }
   204   virtual uint size_of() const { return sizeof(MachNode); }
   205   virtual int  Opcode() const;          // Always equal to MachNode
   205   virtual int  Opcode() const;          // Always equal to MachNode
   209   virtual uint oper_input_base() const { return 1; }
   209   virtual uint oper_input_base() const { return 1; }
   210   // Position of constant base node in node's inputs. -1 if
   210   // Position of constant base node in node's inputs. -1 if
   211   // no constant base node input.
   211   // no constant base node input.
   212   virtual uint mach_constant_base_node_input() const { return (uint)-1; }
   212   virtual uint mach_constant_base_node_input() const { return (uint)-1; }
   213 
   213 
       
   214   uint8_t barrier_data() const { return _barrier; }
       
   215   void set_barrier_data(uint data) { _barrier = data; }
       
   216 
   214   // Copy inputs and operands to new node of instruction.
   217   // Copy inputs and operands to new node of instruction.
   215   // Called from cisc_version() and short_branch_version().
   218   // Called from cisc_version() and short_branch_version().
   216   // !!!! The method's body is defined in ad_<arch>.cpp file.
   219   // !!!! The method's body is defined in ad_<arch>.cpp file.
   217   void fill_new_machnode(MachNode *n) const;
   220   void fill_new_machnode(MachNode *n) const;
   218 
   221 
   252   // for instructions which bind the input and output register to the
   255   // for instructions which bind the input and output register to the
   253   // same singleton regiser (e.g., Intel IDIV which binds AX to be
   256   // same singleton regiser (e.g., Intel IDIV which binds AX to be
   254   // both an input and an output).  It is nessecary when the input and
   257   // both an input and an output).  It is nessecary when the input and
   255   // output have choices - but they must use the same choice.
   258   // output have choices - but they must use the same choice.
   256   virtual uint two_adr( ) const { return 0; }
   259   virtual uint two_adr( ) const { return 0; }
       
   260 
       
   261   // The GC might require some barrier metadata for machine code emission.
       
   262   uint8_t _barrier;
   257 
   263 
   258   // Array of complex operand pointers.  Each corresponds to zero or
   264   // Array of complex operand pointers.  Each corresponds to zero or
   259   // more leafs.  Must be set by MachNode constructor to point to an
   265   // more leafs.  Must be set by MachNode constructor to point to an
   260   // internal array of MachOpers.  The MachOper array is sized by
   266   // internal array of MachOpers.  The MachOper array is sized by
   261   // specific MachNodes described in the ADL.
   267   // specific MachNodes described in the ADL.
  1002 
  1008 
  1003 //------------------------------MachHaltNode-----------------------------------
  1009 //------------------------------MachHaltNode-----------------------------------
  1004 // Machine-specific versions of halt nodes
  1010 // Machine-specific versions of halt nodes
  1005 class MachHaltNode : public MachReturnNode {
  1011 class MachHaltNode : public MachReturnNode {
  1006 public:
  1012 public:
       
  1013   const char* _halt_reason;
  1007   virtual JVMState* jvms() const;
  1014   virtual JVMState* jvms() const;
  1008 };
  1015 };
  1009 
  1016 
  1010 class MachMemBarNode : public MachNode {
  1017 class MachMemBarNode : public MachNode {
  1011   virtual uint size_of() const; // Size is bigger
  1018   virtual uint size_of() const; // Size is bigger