hotspot/src/share/vm/opto/machnode.hpp
changeset 22850 4e69ce7e1101
parent 22847 603ad1f10e16
child 22853 308672304981
equal deleted inserted replaced
22849:b8670e920530 22850:4e69ce7e1101
   179   virtual int  Opcode() const;          // Always equal to MachNode
   179   virtual int  Opcode() const;          // Always equal to MachNode
   180   virtual uint rule() const = 0;        // Machine-specific opcode
   180   virtual uint rule() const = 0;        // Machine-specific opcode
   181   // Number of inputs which come before the first operand.
   181   // Number of inputs which come before the first operand.
   182   // Generally at least 1, to skip the Control input
   182   // Generally at least 1, to skip the Control input
   183   virtual uint oper_input_base() const { return 1; }
   183   virtual uint oper_input_base() const { return 1; }
       
   184   // Position of constant base node in node's inputs. -1 if
       
   185   // no constant base node input.
       
   186   virtual uint mach_constant_base_node_input() const { return (uint)-1; }
   184 
   187 
   185   // Copy inputs and operands to new node of instruction.
   188   // Copy inputs and operands to new node of instruction.
   186   // Called from cisc_version() and short_branch_version().
   189   // Called from cisc_version() and short_branch_version().
   187   // !!!! The method's body is defined in ad_<arch>.cpp file.
   190   // !!!! The method's body is defined in ad_<arch>.cpp file.
   188   void fill_new_machnode(MachNode *n, Compile* C) const;
   191   void fill_new_machnode(MachNode *n, Compile* C) const;
   248   virtual int   compute_padding(int current_offset) const { return 0; }
   251   virtual int   compute_padding(int current_offset) const { return 0; }
   249 
   252 
   250   // Return number of relocatable values contained in this instruction
   253   // Return number of relocatable values contained in this instruction
   251   virtual int   reloc() const { return 0; }
   254   virtual int   reloc() const { return 0; }
   252 
   255 
       
   256   // Return number of words used for double constants in this instruction
       
   257   virtual int   ins_num_consts() const { return 0; }
       
   258 
   253   // Hash and compare over operands.  Used to do GVN on machine Nodes.
   259   // Hash and compare over operands.  Used to do GVN on machine Nodes.
   254   virtual uint  hash() const;
   260   virtual uint  hash() const;
   255   virtual uint  cmp( const Node &n ) const;
   261   virtual uint  cmp( const Node &n ) const;
   256 
   262 
   257   // Expand method for MachNode, replaces nodes representing pseudo
   263   // Expand method for MachNode, replaces nodes representing pseudo
   410       return MachConstantBaseNode::static_out_RegMask();
   416       return MachConstantBaseNode::static_out_RegMask();
   411     return MachNode::in_RegMask(idx);
   417     return MachNode::in_RegMask(idx);
   412   }
   418   }
   413 
   419 
   414   // Input edge of MachConstantBaseNode.
   420   // Input edge of MachConstantBaseNode.
   415   uint mach_constant_base_node_input() const { return req() - 1; }
   421   virtual uint mach_constant_base_node_input() const { return req() - 1; }
   416 
   422 
   417   int  constant_offset();
   423   int  constant_offset();
   418   int  constant_offset() const { return ((MachConstantNode*) this)->constant_offset(); }
   424   int  constant_offset() const { return ((MachConstantNode*) this)->constant_offset(); }
   419   // Unchecked version to avoid assertions in debug output.
   425   // Unchecked version to avoid assertions in debug output.
   420   int  constant_offset_unchecked() const;
   426   int  constant_offset_unchecked() const;