< prev index next >

src/hotspot/share/c1/c1_LIR.hpp

Print this page


1771 
1772 //--------------------------------
1773 class LabelObj: public CompilationResourceObj {
1774  private:
1775   Label _label;
1776  public:
1777   LabelObj()                                     {}
1778   Label* label()                                 { return &_label; }
1779 };
1780 
1781 
1782 class LIR_OpLock: public LIR_Op {
1783  friend class LIR_OpVisitState;
1784 
1785  private:
1786   LIR_Opr _hdr;
1787   LIR_Opr _obj;
1788   LIR_Opr _lock;
1789   LIR_Opr _scratch;
1790   CodeStub* _stub;

1791  public:
1792   LIR_OpLock(LIR_Code code, LIR_Opr hdr, LIR_Opr obj, LIR_Opr lock, LIR_Opr scratch, CodeStub* stub, CodeEmitInfo* info)
1793     : LIR_Op(code, LIR_OprFact::illegalOpr, info)
1794     , _hdr(hdr)
1795     , _obj(obj)
1796     , _lock(lock)
1797     , _scratch(scratch)
1798     , _stub(stub)                      {}

1799 
1800   LIR_Opr hdr_opr() const                        { return _hdr; }
1801   LIR_Opr obj_opr() const                        { return _obj; }
1802   LIR_Opr lock_opr() const                       { return _lock; }
1803   LIR_Opr scratch_opr() const                    { return _scratch; }
1804   CodeStub* stub() const                         { return _stub; }

1805 
1806   virtual void emit_code(LIR_Assembler* masm);
1807   virtual LIR_OpLock* as_OpLock() { return this; }
1808   void print_instr(outputStream* out) const PRODUCT_RETURN;
1809 };
1810 
1811 
1812 class LIR_OpDelay: public LIR_Op {
1813  friend class LIR_OpVisitState;
1814 
1815  private:
1816   LIR_Op* _op;
1817 
1818  public:
1819   LIR_OpDelay(LIR_Op* op, CodeEmitInfo* info):
1820     LIR_Op(lir_delay_slot, LIR_OprFact::illegalOpr, info),
1821     _op(op) {
1822     assert(op->code() == lir_nop || LIRFillDelaySlots, "should be filling with nops");
1823   }
1824   virtual void emit_code(LIR_Assembler* masm);


2223   void unsigned_shift_right(LIR_Opr value, LIR_Opr count, LIR_Opr dst, LIR_Opr tmp);
2224 
2225   void shift_left(LIR_Opr value, int count, LIR_Opr dst)       { shift_left(value, LIR_OprFact::intConst(count), dst, LIR_OprFact::illegalOpr); }
2226   void shift_right(LIR_Opr value, int count, LIR_Opr dst)      { shift_right(value, LIR_OprFact::intConst(count), dst, LIR_OprFact::illegalOpr); }
2227   void unsigned_shift_right(LIR_Opr value, int count, LIR_Opr dst) { unsigned_shift_right(value, LIR_OprFact::intConst(count), dst, LIR_OprFact::illegalOpr); }
2228 
2229   void lcmp2int(LIR_Opr left, LIR_Opr right, LIR_Opr dst)        { append(new LIR_Op2(lir_cmp_l2i,  left, right, dst)); }
2230   void fcmp2int(LIR_Opr left, LIR_Opr right, LIR_Opr dst, bool is_unordered_less);
2231 
2232   void call_runtime_leaf(address routine, LIR_Opr tmp, LIR_Opr result, LIR_OprList* arguments) {
2233     append(new LIR_OpRTCall(routine, tmp, result, arguments));
2234   }
2235 
2236   void call_runtime(address routine, LIR_Opr tmp, LIR_Opr result,
2237                     LIR_OprList* arguments, CodeEmitInfo* info) {
2238     append(new LIR_OpRTCall(routine, tmp, result, arguments, info));
2239   }
2240 
2241   void load_stack_address_monitor(int monitor_ix, LIR_Opr dst)  { append(new LIR_Op1(lir_monaddr, LIR_OprFact::intConst(monitor_ix), dst)); }
2242   void unlock_object(LIR_Opr hdr, LIR_Opr obj, LIR_Opr lock, LIR_Opr scratch, CodeStub* stub);
2243   void lock_object(LIR_Opr hdr, LIR_Opr obj, LIR_Opr lock, LIR_Opr scratch, CodeStub* stub, CodeEmitInfo* info);
2244 
2245   void set_24bit_fpu()                                               { append(new LIR_Op0(lir_24bit_FPU )); }
2246   void restore_fpu()                                                 { append(new LIR_Op0(lir_reset_FPU )); }
2247   void breakpoint()                                                  { append(new LIR_Op0(lir_breakpoint)); }
2248 
2249   void arraycopy(LIR_Opr src, LIR_Opr src_pos, LIR_Opr dst, LIR_Opr dst_pos, LIR_Opr length, LIR_Opr tmp, ciArrayKlass* expected_type, int flags, CodeEmitInfo* info) { append(new LIR_OpArrayCopy(src, src_pos, dst, dst_pos, length, tmp, expected_type, flags, info)); }
2250 
2251   void update_crc32(LIR_Opr crc, LIR_Opr val, LIR_Opr res)  { append(new LIR_OpUpdateCRC32(crc, val, res)); }
2252 
2253   void fpop_raw()                                { append(new LIR_Op0(lir_fpop_raw)); }
2254 
2255   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);
2256   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);
2257 
2258   void checkcast (LIR_Opr result, LIR_Opr object, ciKlass* klass,
2259                   LIR_Opr tmp1, LIR_Opr tmp2, LIR_Opr tmp3, bool fast_check,
2260                   CodeEmitInfo* info_for_exception, CodeEmitInfo* info_for_patch, CodeStub* stub,
2261                   ciMethod* profiled_method, int profiled_bci, bool is_never_null);
2262   // MethodData* profiling
2263   void profile_call(ciMethod* method, int bci, ciMethod* callee, LIR_Opr mdo, LIR_Opr recv, LIR_Opr t1, ciKlass* cha_klass) {




1771 
1772 //--------------------------------
1773 class LabelObj: public CompilationResourceObj {
1774  private:
1775   Label _label;
1776  public:
1777   LabelObj()                                     {}
1778   Label* label()                                 { return &_label; }
1779 };
1780 
1781 
1782 class LIR_OpLock: public LIR_Op {
1783  friend class LIR_OpVisitState;
1784 
1785  private:
1786   LIR_Opr _hdr;
1787   LIR_Opr _obj;
1788   LIR_Opr _lock;
1789   LIR_Opr _scratch;
1790   CodeStub* _stub;
1791   CodeStub* _throw_imse_stub;
1792  public:
1793   LIR_OpLock(LIR_Code code, LIR_Opr hdr, LIR_Opr obj, LIR_Opr lock, LIR_Opr scratch, CodeStub* stub, CodeEmitInfo* info, CodeStub* throw_imse_stub=NULL)
1794     : LIR_Op(code, LIR_OprFact::illegalOpr, info)
1795     , _hdr(hdr)
1796     , _obj(obj)
1797     , _lock(lock)
1798     , _scratch(scratch)
1799     , _stub(stub)
1800     , _throw_imse_stub(throw_imse_stub)                    {}
1801 
1802   LIR_Opr hdr_opr() const                        { return _hdr; }
1803   LIR_Opr obj_opr() const                        { return _obj; }
1804   LIR_Opr lock_opr() const                       { return _lock; }
1805   LIR_Opr scratch_opr() const                    { return _scratch; }
1806   CodeStub* stub() const                         { return _stub; }
1807   CodeStub* throw_imse_stub() const              { return _throw_imse_stub; }
1808 
1809   virtual void emit_code(LIR_Assembler* masm);
1810   virtual LIR_OpLock* as_OpLock() { return this; }
1811   void print_instr(outputStream* out) const PRODUCT_RETURN;
1812 };
1813 
1814 
1815 class LIR_OpDelay: public LIR_Op {
1816  friend class LIR_OpVisitState;
1817 
1818  private:
1819   LIR_Op* _op;
1820 
1821  public:
1822   LIR_OpDelay(LIR_Op* op, CodeEmitInfo* info):
1823     LIR_Op(lir_delay_slot, LIR_OprFact::illegalOpr, info),
1824     _op(op) {
1825     assert(op->code() == lir_nop || LIRFillDelaySlots, "should be filling with nops");
1826   }
1827   virtual void emit_code(LIR_Assembler* masm);


2226   void unsigned_shift_right(LIR_Opr value, LIR_Opr count, LIR_Opr dst, LIR_Opr tmp);
2227 
2228   void shift_left(LIR_Opr value, int count, LIR_Opr dst)       { shift_left(value, LIR_OprFact::intConst(count), dst, LIR_OprFact::illegalOpr); }
2229   void shift_right(LIR_Opr value, int count, LIR_Opr dst)      { shift_right(value, LIR_OprFact::intConst(count), dst, LIR_OprFact::illegalOpr); }
2230   void unsigned_shift_right(LIR_Opr value, int count, LIR_Opr dst) { unsigned_shift_right(value, LIR_OprFact::intConst(count), dst, LIR_OprFact::illegalOpr); }
2231 
2232   void lcmp2int(LIR_Opr left, LIR_Opr right, LIR_Opr dst)        { append(new LIR_Op2(lir_cmp_l2i,  left, right, dst)); }
2233   void fcmp2int(LIR_Opr left, LIR_Opr right, LIR_Opr dst, bool is_unordered_less);
2234 
2235   void call_runtime_leaf(address routine, LIR_Opr tmp, LIR_Opr result, LIR_OprList* arguments) {
2236     append(new LIR_OpRTCall(routine, tmp, result, arguments));
2237   }
2238 
2239   void call_runtime(address routine, LIR_Opr tmp, LIR_Opr result,
2240                     LIR_OprList* arguments, CodeEmitInfo* info) {
2241     append(new LIR_OpRTCall(routine, tmp, result, arguments, info));
2242   }
2243 
2244   void load_stack_address_monitor(int monitor_ix, LIR_Opr dst)  { append(new LIR_Op1(lir_monaddr, LIR_OprFact::intConst(monitor_ix), dst)); }
2245   void unlock_object(LIR_Opr hdr, LIR_Opr obj, LIR_Opr lock, LIR_Opr scratch, CodeStub* stub);
2246   void lock_object(LIR_Opr hdr, LIR_Opr obj, LIR_Opr lock, LIR_Opr scratch, CodeStub* stub, CodeEmitInfo* info, CodeStub* throw_imse_stub=NULL);
2247 
2248   void set_24bit_fpu()                                               { append(new LIR_Op0(lir_24bit_FPU )); }
2249   void restore_fpu()                                                 { append(new LIR_Op0(lir_reset_FPU )); }
2250   void breakpoint()                                                  { append(new LIR_Op0(lir_breakpoint)); }
2251 
2252   void arraycopy(LIR_Opr src, LIR_Opr src_pos, LIR_Opr dst, LIR_Opr dst_pos, LIR_Opr length, LIR_Opr tmp, ciArrayKlass* expected_type, int flags, CodeEmitInfo* info) { append(new LIR_OpArrayCopy(src, src_pos, dst, dst_pos, length, tmp, expected_type, flags, info)); }
2253 
2254   void update_crc32(LIR_Opr crc, LIR_Opr val, LIR_Opr res)  { append(new LIR_OpUpdateCRC32(crc, val, res)); }
2255 
2256   void fpop_raw()                                { append(new LIR_Op0(lir_fpop_raw)); }
2257 
2258   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);
2259   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);
2260 
2261   void checkcast (LIR_Opr result, LIR_Opr object, ciKlass* klass,
2262                   LIR_Opr tmp1, LIR_Opr tmp2, LIR_Opr tmp3, bool fast_check,
2263                   CodeEmitInfo* info_for_exception, CodeEmitInfo* info_for_patch, CodeStub* stub,
2264                   ciMethod* profiled_method, int profiled_bci, bool is_never_null);
2265   // MethodData* profiling
2266   void profile_call(ciMethod* method, int bci, ciMethod* callee, LIR_Opr mdo, LIR_Opr recv, LIR_Opr t1, ciKlass* cha_klass) {


< prev index next >