hotspot/src/share/vm/opto/memnode.hpp
changeset 2154 72a9b7284ccf
parent 2105 347008ce7984
parent 2150 0d91d17158cc
child 2348 4e71ed4c2709
equal deleted inserted replaced
2106:ec595a5e793e 2154:72a9b7284ccf
   205   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
   205   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
   206   virtual int store_Opcode() const { return Op_StoreB; }
   206   virtual int store_Opcode() const { return Op_StoreB; }
   207   virtual BasicType memory_type() const { return T_BYTE; }
   207   virtual BasicType memory_type() const { return T_BYTE; }
   208 };
   208 };
   209 
   209 
       
   210 //------------------------------LoadUBNode-------------------------------------
       
   211 // Load a unsigned byte (8bits unsigned) from memory
       
   212 class LoadUBNode : public LoadNode {
       
   213 public:
       
   214   LoadUBNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt* ti = TypeInt::UBYTE )
       
   215     : LoadNode(c, mem, adr, at, ti) {}
       
   216   virtual int Opcode() const;
       
   217   virtual uint ideal_reg() const { return Op_RegI; }
       
   218   virtual Node* Ideal(PhaseGVN *phase, bool can_reshape);
       
   219   virtual int store_Opcode() const { return Op_StoreB; }
       
   220   virtual BasicType memory_type() const { return T_BYTE; }
       
   221 };
       
   222 
   210 //------------------------------LoadUSNode-------------------------------------
   223 //------------------------------LoadUSNode-------------------------------------
   211 // Load an unsigned short/char (16bits unsigned) from memory
   224 // Load an unsigned short/char (16bits unsigned) from memory
   212 class LoadUSNode : public LoadNode {
   225 class LoadUSNode : public LoadNode {
   213 public:
   226 public:
   214   LoadUSNode( Node *c, Node *mem, Node *adr, const TypePtr* at, const TypeInt *ti = TypeInt::CHAR )
   227   LoadUSNode( Node *c, Node *mem, Node *adr, const TypePtr* at, const TypeInt *ti = TypeInt::CHAR )
   228     : LoadNode(c,mem,adr,at,ti) {}
   241     : LoadNode(c,mem,adr,at,ti) {}
   229   virtual int Opcode() const;
   242   virtual int Opcode() const;
   230   virtual uint ideal_reg() const { return Op_RegI; }
   243   virtual uint ideal_reg() const { return Op_RegI; }
   231   virtual int store_Opcode() const { return Op_StoreI; }
   244   virtual int store_Opcode() const { return Op_StoreI; }
   232   virtual BasicType memory_type() const { return T_INT; }
   245   virtual BasicType memory_type() const { return T_INT; }
       
   246 };
       
   247 
       
   248 //------------------------------LoadUI2LNode-----------------------------------
       
   249 // Load an unsigned integer into long from memory
       
   250 class LoadUI2LNode : public LoadNode {
       
   251 public:
       
   252   LoadUI2LNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeLong* t = TypeLong::UINT)
       
   253     : LoadNode(c, mem, adr, at, t) {}
       
   254   virtual int Opcode() const;
       
   255   virtual uint ideal_reg() const { return Op_RegL; }
       
   256   virtual int store_Opcode() const { return Op_StoreL; }
       
   257   virtual BasicType memory_type() const { return T_LONG; }
   233 };
   258 };
   234 
   259 
   235 //------------------------------LoadRangeNode----------------------------------
   260 //------------------------------LoadRangeNode----------------------------------
   236 // Load an array length from the array
   261 // Load an array length from the array
   237 class LoadRangeNode : public LoadINode {
   262 class LoadRangeNode : public LoadINode {
   755 //------------------------------MemBar-----------------------------------------
   780 //------------------------------MemBar-----------------------------------------
   756 // There are different flavors of Memory Barriers to match the Java Memory
   781 // There are different flavors of Memory Barriers to match the Java Memory
   757 // Model.  Monitor-enter and volatile-load act as Aquires: no following ref
   782 // Model.  Monitor-enter and volatile-load act as Aquires: no following ref
   758 // can be moved to before them.  We insert a MemBar-Acquire after a FastLock or
   783 // can be moved to before them.  We insert a MemBar-Acquire after a FastLock or
   759 // volatile-load.  Monitor-exit and volatile-store act as Release: no
   784 // volatile-load.  Monitor-exit and volatile-store act as Release: no
   760 // preceeding ref can be moved to after them.  We insert a MemBar-Release
   785 // preceding ref can be moved to after them.  We insert a MemBar-Release
   761 // before a FastUnlock or volatile-store.  All volatiles need to be
   786 // before a FastUnlock or volatile-store.  All volatiles need to be
   762 // serialized, so we follow all volatile-stores with a MemBar-Volatile to
   787 // serialized, so we follow all volatile-stores with a MemBar-Volatile to
   763 // seperate it from any following volatile-load.
   788 // separate it from any following volatile-load.
   764 class MemBarNode: public MultiNode {
   789 class MemBarNode: public MultiNode {
   765   virtual uint hash() const ;                  // { return NO_HASH; }
   790   virtual uint hash() const ;                  // { return NO_HASH; }
   766   virtual uint cmp( const Node &n ) const ;    // Always fail, except on self
   791   virtual uint cmp( const Node &n ) const ;    // Always fail, except on self
   767 
   792 
   768   virtual uint size_of() const { return sizeof(*this); }
   793   virtual uint size_of() const { return sizeof(*this); }