< prev index next >

src/hotspot/share/c1/c1_LIR.hpp

Print this page

1811     , _lock(lock)
1812     , _scratch(scratch)
1813     , _stub(stub)                      {}
1814 
1815   LIR_Opr hdr_opr() const                        { return _hdr; }
1816   LIR_Opr obj_opr() const                        { return _obj; }
1817   LIR_Opr lock_opr() const                       { return _lock; }
1818   LIR_Opr scratch_opr() const                    { return _scratch; }
1819   CodeStub* stub() const                         { return _stub; }
1820 
1821   virtual void emit_code(LIR_Assembler* masm);
1822   virtual LIR_OpLock* as_OpLock() { return this; }
1823   void print_instr(outputStream* out) const PRODUCT_RETURN;
1824 };
1825 
1826 class LIR_OpLoadKlass: public LIR_Op {
1827   friend class LIR_OpVisitState;
1828 
1829  private:
1830   LIR_Opr _obj;

1831  public:
1832   LIR_OpLoadKlass(LIR_Opr obj, LIR_Opr result, CodeEmitInfo* info)
1833     : LIR_Op(lir_load_klass, result, info)
1834     , _obj(obj)
1835     {}
1836 
1837   LIR_Opr obj()        const { return _obj;  }

1838 
1839   virtual LIR_OpLoadKlass* as_OpLoadKlass() { return this; }
1840   virtual void emit_code(LIR_Assembler* masm);
1841   void print_instr(outputStream* out) const PRODUCT_RETURN;
1842 };
1843 
1844 class LIR_OpDelay: public LIR_Op {
1845  friend class LIR_OpVisitState;
1846 
1847  private:
1848   LIR_Op* _op;
1849 
1850  public:
1851   LIR_OpDelay(LIR_Op* op, CodeEmitInfo* info):
1852     LIR_Op(lir_delay_slot, LIR_OprFact::illegalOpr, info),
1853     _op(op) {
1854     assert(op->code() == lir_nop, "should be filling with nops");
1855   }
1856   virtual void emit_code(LIR_Assembler* masm);
1857   virtual LIR_OpDelay* as_OpDelay() { return this; }

2266   void update_crc32(LIR_Opr crc, LIR_Opr val, LIR_Opr res)  { append(new LIR_OpUpdateCRC32(crc, val, res)); }
2267 
2268   void instanceof(LIR_Opr result, LIR_Opr object, ciKlass* klass, LIR_Opr tmp1, LIR_Opr tmp2, LIR_Opr tmp3, bool fast_check, CodeEmitInfo* info_for_patch, ciMethod* profiled_method, int profiled_bci);
2269   void store_check(LIR_Opr object, LIR_Opr array, LIR_Opr tmp1, LIR_Opr tmp2, LIR_Opr tmp3, CodeEmitInfo* info_for_exception, ciMethod* profiled_method, int profiled_bci);
2270 
2271   void checkcast (LIR_Opr result, LIR_Opr object, ciKlass* klass,
2272                   LIR_Opr tmp1, LIR_Opr tmp2, LIR_Opr tmp3, bool fast_check,
2273                   CodeEmitInfo* info_for_exception, CodeEmitInfo* info_for_patch, CodeStub* stub,
2274                   ciMethod* profiled_method, int profiled_bci);
2275   // MethodData* profiling
2276   void profile_call(ciMethod* method, int bci, ciMethod* callee, LIR_Opr mdo, LIR_Opr recv, LIR_Opr t1, ciKlass* cha_klass) {
2277     append(new LIR_OpProfileCall(method, bci, callee, mdo, recv, t1, cha_klass));
2278   }
2279   void profile_type(LIR_Address* mdp, LIR_Opr obj, ciKlass* exact_klass, intptr_t current_klass, LIR_Opr tmp, bool not_null, bool no_conflict) {
2280     append(new LIR_OpProfileType(LIR_OprFact::address(mdp), obj, exact_klass, current_klass, tmp, not_null, no_conflict));
2281   }
2282 
2283   void xadd(LIR_Opr src, LIR_Opr add, LIR_Opr res, LIR_Opr tmp) { append(new LIR_Op2(lir_xadd, src, add, res, tmp)); }
2284   void xchg(LIR_Opr src, LIR_Opr set, LIR_Opr res, LIR_Opr tmp) { append(new LIR_Op2(lir_xchg, src, set, res, tmp)); }
2285 
2286   void load_klass(LIR_Opr obj, LIR_Opr result, CodeEmitInfo* info) { append(new LIR_OpLoadKlass(obj, result, info)); }
2287 
2288 #ifdef ASSERT
2289   void lir_assert(LIR_Condition condition, LIR_Opr opr1, LIR_Opr opr2, const char* msg, bool halt) { append(new LIR_OpAssert(condition, opr1, opr2, msg, halt)); }
2290 #endif
2291 };
2292 
2293 void print_LIR(BlockList* blocks);
2294 
2295 class LIR_InsertionBuffer : public CompilationResourceObj {
2296  private:
2297   LIR_List*   _lir;   // the lir list where ops of this buffer should be inserted later (NULL when uninitialized)
2298 
2299   // list of insertion points. index and count are stored alternately:
2300   // _index_and_count[i * 2]:     the index into lir list where "count" ops should be inserted
2301   // _index_and_count[i * 2 + 1]: the number of ops to be inserted at index
2302   intStack    _index_and_count;
2303 
2304   // the LIR_Ops to be inserted
2305   LIR_OpList  _ops;
2306 

1811     , _lock(lock)
1812     , _scratch(scratch)
1813     , _stub(stub)                      {}
1814 
1815   LIR_Opr hdr_opr() const                        { return _hdr; }
1816   LIR_Opr obj_opr() const                        { return _obj; }
1817   LIR_Opr lock_opr() const                       { return _lock; }
1818   LIR_Opr scratch_opr() const                    { return _scratch; }
1819   CodeStub* stub() const                         { return _stub; }
1820 
1821   virtual void emit_code(LIR_Assembler* masm);
1822   virtual LIR_OpLock* as_OpLock() { return this; }
1823   void print_instr(outputStream* out) const PRODUCT_RETURN;
1824 };
1825 
1826 class LIR_OpLoadKlass: public LIR_Op {
1827   friend class LIR_OpVisitState;
1828 
1829  private:
1830   LIR_Opr _obj;
1831   CodeStub* _stub;
1832  public:
1833   LIR_OpLoadKlass(LIR_Opr obj, LIR_Opr result, CodeEmitInfo* info, CodeStub* stub)
1834     : LIR_Op(lir_load_klass, result, info)
1835     , _obj(obj)
1836     , _stub(stub) {}
1837 
1838   LIR_Opr obj()        const { return _obj;  }
1839   CodeStub* stub()     const { return _stub; }
1840 
1841   virtual LIR_OpLoadKlass* as_OpLoadKlass() { return this; }
1842   virtual void emit_code(LIR_Assembler* masm);
1843   void print_instr(outputStream* out) const PRODUCT_RETURN;
1844 };
1845 
1846 class LIR_OpDelay: public LIR_Op {
1847  friend class LIR_OpVisitState;
1848 
1849  private:
1850   LIR_Op* _op;
1851 
1852  public:
1853   LIR_OpDelay(LIR_Op* op, CodeEmitInfo* info):
1854     LIR_Op(lir_delay_slot, LIR_OprFact::illegalOpr, info),
1855     _op(op) {
1856     assert(op->code() == lir_nop, "should be filling with nops");
1857   }
1858   virtual void emit_code(LIR_Assembler* masm);
1859   virtual LIR_OpDelay* as_OpDelay() { return this; }

2268   void update_crc32(LIR_Opr crc, LIR_Opr val, LIR_Opr res)  { append(new LIR_OpUpdateCRC32(crc, val, res)); }
2269 
2270   void instanceof(LIR_Opr result, LIR_Opr object, ciKlass* klass, LIR_Opr tmp1, LIR_Opr tmp2, LIR_Opr tmp3, bool fast_check, CodeEmitInfo* info_for_patch, ciMethod* profiled_method, int profiled_bci);
2271   void store_check(LIR_Opr object, LIR_Opr array, LIR_Opr tmp1, LIR_Opr tmp2, LIR_Opr tmp3, CodeEmitInfo* info_for_exception, ciMethod* profiled_method, int profiled_bci);
2272 
2273   void checkcast (LIR_Opr result, LIR_Opr object, ciKlass* klass,
2274                   LIR_Opr tmp1, LIR_Opr tmp2, LIR_Opr tmp3, bool fast_check,
2275                   CodeEmitInfo* info_for_exception, CodeEmitInfo* info_for_patch, CodeStub* stub,
2276                   ciMethod* profiled_method, int profiled_bci);
2277   // MethodData* profiling
2278   void profile_call(ciMethod* method, int bci, ciMethod* callee, LIR_Opr mdo, LIR_Opr recv, LIR_Opr t1, ciKlass* cha_klass) {
2279     append(new LIR_OpProfileCall(method, bci, callee, mdo, recv, t1, cha_klass));
2280   }
2281   void profile_type(LIR_Address* mdp, LIR_Opr obj, ciKlass* exact_klass, intptr_t current_klass, LIR_Opr tmp, bool not_null, bool no_conflict) {
2282     append(new LIR_OpProfileType(LIR_OprFact::address(mdp), obj, exact_klass, current_klass, tmp, not_null, no_conflict));
2283   }
2284 
2285   void xadd(LIR_Opr src, LIR_Opr add, LIR_Opr res, LIR_Opr tmp) { append(new LIR_Op2(lir_xadd, src, add, res, tmp)); }
2286   void xchg(LIR_Opr src, LIR_Opr set, LIR_Opr res, LIR_Opr tmp) { append(new LIR_Op2(lir_xchg, src, set, res, tmp)); }
2287 
2288   void load_klass(LIR_Opr obj, LIR_Opr result, CodeEmitInfo* info, CodeStub* stub) { append(new LIR_OpLoadKlass(obj, result, info, stub)); }
2289 
2290 #ifdef ASSERT
2291   void lir_assert(LIR_Condition condition, LIR_Opr opr1, LIR_Opr opr2, const char* msg, bool halt) { append(new LIR_OpAssert(condition, opr1, opr2, msg, halt)); }
2292 #endif
2293 };
2294 
2295 void print_LIR(BlockList* blocks);
2296 
2297 class LIR_InsertionBuffer : public CompilationResourceObj {
2298  private:
2299   LIR_List*   _lir;   // the lir list where ops of this buffer should be inserted later (NULL when uninitialized)
2300 
2301   // list of insertion points. index and count are stored alternately:
2302   // _index_and_count[i * 2]:     the index into lir list where "count" ops should be inserted
2303   // _index_and_count[i * 2 + 1]: the number of ops to be inserted at index
2304   intStack    _index_and_count;
2305 
2306   // the LIR_Ops to be inserted
2307   LIR_OpList  _ops;
2308 
< prev index next >