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 void clear_decorators(DecoratorSet ds) { _decorators &= ~ds; }
106 bool is_raw() const { return (_decorators & AS_RAW) != 0; }
107 };
108
109 // The BarrierSetC1 class is the main entry point for the GC backend of the Access API in C1.
110 // It is called by the LIRGenerator::access_* functions, which is the main entry poing for
111 // access calls in C1.
112
113 class BarrierSetC1: public CHeapObj<mtGC> {
114 protected:
115 virtual LIR_Opr resolve_address(LIRAccess& access, bool resolve_in_register);
116
117 virtual void generate_referent_check(LIRAccess& access, LabelObj* cont);
118
119 // Accesses with resolved address
120 virtual void store_at_resolved(LIRAccess& access, LIR_Opr value);
121 virtual void load_at_resolved(LIRAccess& access, LIR_Opr result);
122
123 virtual LIR_Opr atomic_cmpxchg_at_resolved(LIRAccess& access, LIRItem& cmp_value, LIRItem& new_value);
|
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 || _type == T_VALUETYPE; }
104 DecoratorSet decorators() const { return _decorators; }
105 void clear_decorators(DecoratorSet ds) { _decorators &= ~ds; }
106 bool is_raw() const { return (_decorators & AS_RAW) != 0; }
107 };
108
109 // The BarrierSetC1 class is the main entry point for the GC backend of the Access API in C1.
110 // It is called by the LIRGenerator::access_* functions, which is the main entry poing for
111 // access calls in C1.
112
113 class BarrierSetC1: public CHeapObj<mtGC> {
114 protected:
115 virtual LIR_Opr resolve_address(LIRAccess& access, bool resolve_in_register);
116
117 virtual void generate_referent_check(LIRAccess& access, LabelObj* cont);
118
119 // Accesses with resolved address
120 virtual void store_at_resolved(LIRAccess& access, LIR_Opr value);
121 virtual void load_at_resolved(LIRAccess& access, LIR_Opr result);
122
123 virtual LIR_Opr atomic_cmpxchg_at_resolved(LIRAccess& access, LIRItem& cmp_value, LIRItem& new_value);
|