< prev index next >

src/hotspot/share/c1/c1_LIR.hpp

Print this page

1901     , _lock(lock)
1902     , _scratch(scratch)
1903     , _stub(stub)                      {}
1904 
1905   LIR_Opr hdr_opr() const                        { return _hdr; }
1906   LIR_Opr obj_opr() const                        { return _obj; }
1907   LIR_Opr lock_opr() const                       { return _lock; }
1908   LIR_Opr scratch_opr() const                    { return _scratch; }
1909   CodeStub* stub() const                         { return _stub; }
1910 
1911   virtual void emit_code(LIR_Assembler* masm);
1912   virtual LIR_OpLock* as_OpLock() { return this; }
1913   void print_instr(outputStream* out) const PRODUCT_RETURN;
1914 };
1915 
1916 class LIR_OpLoadKlass: public LIR_Op {
1917   friend class LIR_OpVisitState;
1918 
1919  private:
1920   LIR_Opr _obj;

1921  public:
1922   LIR_OpLoadKlass(LIR_Opr obj, LIR_Opr result, CodeEmitInfo* info)
1923     : LIR_Op(lir_load_klass, result, info)
1924     , _obj(obj)
1925     {}
1926 
1927   LIR_Opr obj()        const { return _obj;  }

1928 
1929   virtual LIR_OpLoadKlass* as_OpLoadKlass() { return this; }
1930   virtual void emit_code(LIR_Assembler* masm);
1931   void print_instr(outputStream* out) const PRODUCT_RETURN;
1932 };
1933 
1934 class LIR_OpDelay: public LIR_Op {
1935  friend class LIR_OpVisitState;
1936 
1937  private:
1938   LIR_Op* _op;
1939 
1940  public:
1941   LIR_OpDelay(LIR_Op* op, CodeEmitInfo* info):
1942     LIR_Op(lir_delay_slot, LIR_OprFact::illegalOpr, info),
1943     _op(op) {
1944     assert(op->code() == lir_nop, "should be filling with nops");
1945   }
1946   virtual void emit_code(LIR_Assembler* masm);
1947   virtual LIR_OpDelay* as_OpDelay() { return this; }

2380   void update_crc32(LIR_Opr crc, LIR_Opr val, LIR_Opr res)  { append(new LIR_OpUpdateCRC32(crc, val, res)); }
2381 
2382   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);
2383   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);
2384 
2385   void checkcast (LIR_Opr result, LIR_Opr object, ciKlass* klass,
2386                   LIR_Opr tmp1, LIR_Opr tmp2, LIR_Opr tmp3, bool fast_check,
2387                   CodeEmitInfo* info_for_exception, CodeEmitInfo* info_for_patch, CodeStub* stub,
2388                   ciMethod* profiled_method, int profiled_bci);
2389   // MethodData* profiling
2390   void profile_call(ciMethod* method, int bci, ciMethod* callee, LIR_Opr mdo, LIR_Opr recv, LIR_Opr t1, ciKlass* cha_klass) {
2391     append(new LIR_OpProfileCall(method, bci, callee, mdo, recv, t1, cha_klass));
2392   }
2393   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) {
2394     append(new LIR_OpProfileType(LIR_OprFact::address(mdp), obj, exact_klass, current_klass, tmp, not_null, no_conflict));
2395   }
2396 
2397   void xadd(LIR_Opr src, LIR_Opr add, LIR_Opr res, LIR_Opr tmp) { append(new LIR_Op2(lir_xadd, src, add, res, tmp)); }
2398   void xchg(LIR_Opr src, LIR_Opr set, LIR_Opr res, LIR_Opr tmp) { append(new LIR_Op2(lir_xchg, src, set, res, tmp)); }
2399 
2400   void load_klass(LIR_Opr obj, LIR_Opr result, CodeEmitInfo* info) { append(new LIR_OpLoadKlass(obj, result, info)); }
2401 
2402 #ifdef ASSERT
2403   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)); }
2404 #endif
2405 };
2406 
2407 void print_LIR(BlockList* blocks);
2408 
2409 class LIR_InsertionBuffer : public CompilationResourceObj {
2410  private:
2411   LIR_List*   _lir;   // the lir list where ops of this buffer should be inserted later (NULL when uninitialized)
2412 
2413   // list of insertion points. index and count are stored alternately:
2414   // _index_and_count[i * 2]:     the index into lir list where "count" ops should be inserted
2415   // _index_and_count[i * 2 + 1]: the number of ops to be inserted at index
2416   intStack    _index_and_count;
2417 
2418   // the LIR_Ops to be inserted
2419   LIR_OpList  _ops;
2420 

1901     , _lock(lock)
1902     , _scratch(scratch)
1903     , _stub(stub)                      {}
1904 
1905   LIR_Opr hdr_opr() const                        { return _hdr; }
1906   LIR_Opr obj_opr() const                        { return _obj; }
1907   LIR_Opr lock_opr() const                       { return _lock; }
1908   LIR_Opr scratch_opr() const                    { return _scratch; }
1909   CodeStub* stub() const                         { return _stub; }
1910 
1911   virtual void emit_code(LIR_Assembler* masm);
1912   virtual LIR_OpLock* as_OpLock() { return this; }
1913   void print_instr(outputStream* out) const PRODUCT_RETURN;
1914 };
1915 
1916 class LIR_OpLoadKlass: public LIR_Op {
1917   friend class LIR_OpVisitState;
1918 
1919  private:
1920   LIR_Opr _obj;
1921   CodeStub* _stub;
1922  public:
1923   LIR_OpLoadKlass(LIR_Opr obj, LIR_Opr result, CodeEmitInfo* info, CodeStub* stub)
1924     : LIR_Op(lir_load_klass, result, info)
1925     , _obj(obj)
1926     , _stub(stub) {}
1927 
1928   LIR_Opr obj()        const { return _obj;  }
1929   CodeStub* stub()     const { return _stub; }
1930 
1931   virtual LIR_OpLoadKlass* as_OpLoadKlass() { return this; }
1932   virtual void emit_code(LIR_Assembler* masm);
1933   void print_instr(outputStream* out) const PRODUCT_RETURN;
1934 };
1935 
1936 class LIR_OpDelay: public LIR_Op {
1937  friend class LIR_OpVisitState;
1938 
1939  private:
1940   LIR_Op* _op;
1941 
1942  public:
1943   LIR_OpDelay(LIR_Op* op, CodeEmitInfo* info):
1944     LIR_Op(lir_delay_slot, LIR_OprFact::illegalOpr, info),
1945     _op(op) {
1946     assert(op->code() == lir_nop, "should be filling with nops");
1947   }
1948   virtual void emit_code(LIR_Assembler* masm);
1949   virtual LIR_OpDelay* as_OpDelay() { return this; }

2382   void update_crc32(LIR_Opr crc, LIR_Opr val, LIR_Opr res)  { append(new LIR_OpUpdateCRC32(crc, val, res)); }
2383 
2384   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);
2385   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);
2386 
2387   void checkcast (LIR_Opr result, LIR_Opr object, ciKlass* klass,
2388                   LIR_Opr tmp1, LIR_Opr tmp2, LIR_Opr tmp3, bool fast_check,
2389                   CodeEmitInfo* info_for_exception, CodeEmitInfo* info_for_patch, CodeStub* stub,
2390                   ciMethod* profiled_method, int profiled_bci);
2391   // MethodData* profiling
2392   void profile_call(ciMethod* method, int bci, ciMethod* callee, LIR_Opr mdo, LIR_Opr recv, LIR_Opr t1, ciKlass* cha_klass) {
2393     append(new LIR_OpProfileCall(method, bci, callee, mdo, recv, t1, cha_klass));
2394   }
2395   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) {
2396     append(new LIR_OpProfileType(LIR_OprFact::address(mdp), obj, exact_klass, current_klass, tmp, not_null, no_conflict));
2397   }
2398 
2399   void xadd(LIR_Opr src, LIR_Opr add, LIR_Opr res, LIR_Opr tmp) { append(new LIR_Op2(lir_xadd, src, add, res, tmp)); }
2400   void xchg(LIR_Opr src, LIR_Opr set, LIR_Opr res, LIR_Opr tmp) { append(new LIR_Op2(lir_xchg, src, set, res, tmp)); }
2401 
2402   void load_klass(LIR_Opr obj, LIR_Opr result, CodeEmitInfo* info, CodeStub* stub) { append(new LIR_OpLoadKlass(obj, result, info, stub)); }
2403 
2404 #ifdef ASSERT
2405   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)); }
2406 #endif
2407 };
2408 
2409 void print_LIR(BlockList* blocks);
2410 
2411 class LIR_InsertionBuffer : public CompilationResourceObj {
2412  private:
2413   LIR_List*   _lir;   // the lir list where ops of this buffer should be inserted later (NULL when uninitialized)
2414 
2415   // list of insertion points. index and count are stored alternately:
2416   // _index_and_count[i * 2]:     the index into lir list where "count" ops should be inserted
2417   // _index_and_count[i * 2 + 1]: the number of ops to be inserted at index
2418   intStack    _index_and_count;
2419 
2420   // the LIR_Ops to be inserted
2421   LIR_OpList  _ops;
2422 
< prev index next >