src/hotspot/share/opto/machnode.hpp
changeset 58516 d376d86b0a01
parent 58061 fafba5cf3546
child 58665 30a5049a36bb
child 58679 9c3209ff7550
equal deleted inserted replaced
58515:8f849d3ec1e5 58516:d376d86b0a01
   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.