< prev index next >

src/hotspot/share/gc/shared/c1/barrierSetC1.hpp

Print this page




  79     _decorators(AccessInternal::decorator_fixup(decorators)),
  80     _base(base),
  81     _offset(offset),
  82     _type(type),
  83     _resolved_addr(NULL),
  84     _patch_emit_info(patch_emit_info),
  85     _access_emit_info(access_emit_info) {}
  86 
  87   void load_base()   { _base.item().load_item(); }
  88   void load_offset() { _offset.item().load_nonconstant(); }
  89 
  90   void load_address() {
  91     load_base();
  92     load_offset();
  93   }
  94 
  95   LIRGenerator* gen() const            { return _gen; }
  96   CodeEmitInfo*& patch_emit_info()     { return _patch_emit_info; }
  97   CodeEmitInfo*& access_emit_info()    { return _access_emit_info; }
  98   LIRAddressOpr& base()                { return _base; }

  99   LIRAddressOpr& offset()              { return _offset; }
 100   BasicType type() const               { return _type; }
 101   LIR_Opr resolved_addr() const        { return _resolved_addr; }
 102   void set_resolved_addr(LIR_Opr addr) { _resolved_addr = addr; }
 103   bool is_oop() const                  { return _type == T_ARRAY || _type == T_OBJECT; }
 104   DecoratorSet decorators() const      { return _decorators; }
 105   bool is_raw() const                  { return (_decorators & AS_RAW) != 0; }

 106 };
 107 
 108 // The BarrierSetC1 class is the main entry point for the GC backend of the Access API in C1.
 109 // It is called by the LIRGenerator::access_* functions, which is the main entry poing for
 110 // access calls in C1.
 111 
 112 class BarrierSetC1: public CHeapObj<mtGC> {
 113 protected:
 114   virtual LIR_Opr resolve_address(LIRAccess& access, bool resolve_in_register);
 115 
 116   virtual void generate_referent_check(LIRAccess& access, LabelObj* cont);
 117 
 118   // Accesses with resolved address
 119   virtual void store_at_resolved(LIRAccess& access, LIR_Opr value);
 120   virtual void load_at_resolved(LIRAccess& access, LIR_Opr result);
 121 
 122   virtual LIR_Opr atomic_cmpxchg_at_resolved(LIRAccess& access, LIRItem& cmp_value, LIRItem& new_value);
 123 
 124   virtual LIR_Opr atomic_xchg_at_resolved(LIRAccess& access, LIRItem& value);
 125   virtual LIR_Opr atomic_add_at_resolved(LIRAccess& access, LIRItem& value);
 126 
 127 public:
 128   virtual void store_at(LIRAccess& access, LIR_Opr value);
 129   virtual void load_at(LIRAccess& access, LIR_Opr result);
 130 
 131   virtual LIR_Opr atomic_cmpxchg_at(LIRAccess& access, LIRItem& cmp_value, LIRItem& new_value);
 132 
 133   virtual LIR_Opr atomic_xchg_at(LIRAccess& access, LIRItem& value);
 134   virtual LIR_Opr atomic_add_at(LIRAccess& access, LIRItem& value);



 135 
 136   virtual void generate_c1_runtime_stubs(BufferBlob* buffer_blob) {}
 137 };
 138 
 139 #endif // SHARE_GC_SHARED_C1_BARRIERSETC1_HPP


  79     _decorators(AccessInternal::decorator_fixup(decorators)),
  80     _base(base),
  81     _offset(offset),
  82     _type(type),
  83     _resolved_addr(NULL),
  84     _patch_emit_info(patch_emit_info),
  85     _access_emit_info(access_emit_info) {}
  86 
  87   void load_base()   { _base.item().load_item(); }
  88   void load_offset() { _offset.item().load_nonconstant(); }
  89 
  90   void load_address() {
  91     load_base();
  92     load_offset();
  93   }
  94 
  95   LIRGenerator* gen() const            { return _gen; }
  96   CodeEmitInfo*& patch_emit_info()     { return _patch_emit_info; }
  97   CodeEmitInfo*& access_emit_info()    { return _access_emit_info; }
  98   LIRAddressOpr& base()                { return _base; }
  99   void set_base(LIRAddressOpr base)    { _base = base; }
 100   LIRAddressOpr& offset()              { return _offset; }
 101   BasicType type() const               { return _type; }
 102   LIR_Opr resolved_addr() const        { return _resolved_addr; }
 103   void set_resolved_addr(LIR_Opr addr) { _resolved_addr = addr; }
 104   bool is_oop() const                  { return _type == T_ARRAY || _type == T_OBJECT; }
 105   DecoratorSet decorators() const      { return _decorators; }
 106   bool is_raw() const                  { return (_decorators & AS_RAW) != 0; }
 107   bool needs_null_check() const        { return (_decorators & IS_NOT_NULL) == 0; }
 108 };
 109 
 110 // The BarrierSetC1 class is the main entry point for the GC backend of the Access API in C1.
 111 // It is called by the LIRGenerator::access_* functions, which is the main entry poing for
 112 // access calls in C1.
 113 
 114 class BarrierSetC1: public CHeapObj<mtGC> {
 115 protected:
 116   virtual LIR_Opr resolve_address(LIRAccess& access, bool resolve_in_register);
 117 
 118   virtual void generate_referent_check(LIRAccess& access, LabelObj* cont);
 119 
 120   // Accesses with resolved address
 121   virtual void store_at_resolved(LIRAccess& access, LIR_Opr value);
 122   virtual void load_at_resolved(LIRAccess& access, LIR_Opr result);
 123 
 124   virtual LIR_Opr atomic_cmpxchg_at_resolved(LIRAccess& access, LIRItem& cmp_value, LIRItem& new_value);
 125 
 126   virtual LIR_Opr atomic_xchg_at_resolved(LIRAccess& access, LIRItem& value);
 127   virtual LIR_Opr atomic_add_at_resolved(LIRAccess& access, LIRItem& value);
 128 
 129 public:
 130   virtual void store_at(LIRAccess& access, LIR_Opr value);
 131   virtual void load_at(LIRAccess& access, LIR_Opr result);
 132 
 133   virtual LIR_Opr atomic_cmpxchg_at(LIRAccess& access, LIRItem& cmp_value, LIRItem& new_value);
 134 
 135   virtual LIR_Opr atomic_xchg_at(LIRAccess& access, LIRItem& value);
 136   virtual LIR_Opr atomic_add_at(LIRAccess& access, LIRItem& value);
 137 
 138   virtual LIR_Opr resolve_for_read(LIRAccess& access);
 139   virtual LIR_Opr resolve_for_write(LIRAccess& access);
 140 
 141   virtual void generate_c1_runtime_stubs(BufferBlob* buffer_blob) {}
 142 };
 143 
 144 #endif // SHARE_GC_SHARED_C1_BARRIERSETC1_HPP
< prev index next >