< prev index next >

src/hotspot/share/c1/c1_LIRAssembler.hpp

Print this page




  29 #include "ci/ciMethodData.hpp"
  30 #include "oops/methodData.hpp"
  31 #include "utilities/macros.hpp"
  32 
  33 class Compilation;
  34 class ScopeValue;
  35 class BarrierSet;
  36 
  37 class LIR_Assembler: public CompilationResourceObj {
  38  private:
  39   C1_MacroAssembler* _masm;
  40   CodeStubList*      _slow_case_stubs;
  41   BarrierSet*        _bs;
  42 
  43   Compilation*       _compilation;
  44   FrameMap*          _frame_map;
  45   BlockBegin*        _current_block;
  46 
  47   Instruction*       _pending_non_safepoint;
  48   int                _pending_non_safepoint_offset;

  49 
  50   Label              _unwind_handler_entry;
  51 
  52 #ifdef ASSERT
  53   BlockList          _branch_target_blocks;
  54   void check_no_unbound_labels();
  55 #endif
  56 
  57   FrameMap* frame_map() const { return _frame_map; }
  58 
  59   void set_current_block(BlockBegin* b) { _current_block = b; }
  60   BlockBegin* current_block() const { return _current_block; }
  61 
  62   // non-safepoint debug info management
  63   void flush_debug_info(int before_pc_offset) {
  64     if (_pending_non_safepoint != NULL) {
  65       if (_pending_non_safepoint_offset < before_pc_offset)
  66         record_non_safepoint_debug_info();
  67       _pending_non_safepoint = NULL;
  68     }


  99 
 100   // debug information
 101   void add_call_info(int pc_offset, CodeEmitInfo* cinfo);
 102   void add_debug_info_for_branch(CodeEmitInfo* info);
 103   void add_debug_info_for_div0(int pc_offset, CodeEmitInfo* cinfo);
 104   void add_debug_info_for_div0_here(CodeEmitInfo* info);
 105   ImplicitNullCheckStub* add_debug_info_for_null_check(int pc_offset, CodeEmitInfo* cinfo);
 106   ImplicitNullCheckStub* add_debug_info_for_null_check_here(CodeEmitInfo* info);
 107 
 108   void set_24bit_FPU();
 109   void reset_FPU();
 110   void fpop();
 111   void fxch(int i);
 112   void fld(int i);
 113   void ffree(int i);
 114 
 115   void breakpoint();
 116   void push(LIR_Opr opr);
 117   void pop(LIR_Opr opr);
 118 



 119   // patching
 120   void append_patching_stub(PatchingStub* stub);
 121   void patching_epilog(PatchingStub* patch, LIR_PatchCode patch_code, Register obj, CodeEmitInfo* info);
 122 
 123   void comp_op(LIR_Condition condition, LIR_Opr src, LIR_Opr result, LIR_Op2* op);
 124 
 125   PatchingStub::PatchID patching_id(CodeEmitInfo* info);
 126 
 127  public:
 128   LIR_Assembler(Compilation* c);
 129   ~LIR_Assembler();
 130   C1_MacroAssembler* masm() const                { return _masm; }
 131   Compilation* compilation() const               { return _compilation; }
 132   ciMethod* method() const                       { return compilation()->method(); }
 133 
 134   CodeOffsets* offsets() const                   { return _compilation->offsets(); }
 135   int code_offset() const;
 136   address pc() const;
 137 
 138   int  initial_frame_size_in_bytes() const;


 247 
 248   void rt_call(LIR_Opr result, address dest, const LIR_OprList* args, LIR_Opr tmp, CodeEmitInfo* info);
 249 
 250   void membar();
 251   void membar_acquire();
 252   void membar_release();
 253   void membar_loadload();
 254   void membar_storestore();
 255   void membar_loadstore();
 256   void membar_storeload();
 257   void on_spin_wait();
 258   void get_thread(LIR_Opr result);
 259 
 260   void verify_oop_map(CodeEmitInfo* info);
 261 
 262   void atomic_op(LIR_Code code, LIR_Opr src, LIR_Opr data, LIR_Opr dest, LIR_Opr tmp);
 263 
 264 #include CPU_HEADER(c1_LIRAssembler)
 265 
 266  public:

 267 
 268   static int call_stub_size() {
 269     if (UseAOT) {
 270       return _call_stub_size + _call_aot_stub_size;
 271     } else {
 272       return _call_stub_size;
 273     }
 274   }
 275 
 276   static int exception_handler_size() {
 277     return _exception_handler_size;
 278   }
 279 
 280   static int deopt_handler_size() {
 281     return _deopt_handler_size;
 282   }
 283 };
 284 
 285 #endif // SHARE_C1_C1_LIRASSEMBLER_HPP


  29 #include "ci/ciMethodData.hpp"
  30 #include "oops/methodData.hpp"
  31 #include "utilities/macros.hpp"
  32 
  33 class Compilation;
  34 class ScopeValue;
  35 class BarrierSet;
  36 
  37 class LIR_Assembler: public CompilationResourceObj {
  38  private:
  39   C1_MacroAssembler* _masm;
  40   CodeStubList*      _slow_case_stubs;
  41   BarrierSet*        _bs;
  42 
  43   Compilation*       _compilation;
  44   FrameMap*          _frame_map;
  45   BlockBegin*        _current_block;
  46 
  47   Instruction*       _pending_non_safepoint;
  48   int                _pending_non_safepoint_offset;
  49   int                _immediate_oops_patched;
  50 
  51   Label              _unwind_handler_entry;
  52 
  53 #ifdef ASSERT
  54   BlockList          _branch_target_blocks;
  55   void check_no_unbound_labels();
  56 #endif
  57 
  58   FrameMap* frame_map() const { return _frame_map; }
  59 
  60   void set_current_block(BlockBegin* b) { _current_block = b; }
  61   BlockBegin* current_block() const { return _current_block; }
  62 
  63   // non-safepoint debug info management
  64   void flush_debug_info(int before_pc_offset) {
  65     if (_pending_non_safepoint != NULL) {
  66       if (_pending_non_safepoint_offset < before_pc_offset)
  67         record_non_safepoint_debug_info();
  68       _pending_non_safepoint = NULL;
  69     }


 100 
 101   // debug information
 102   void add_call_info(int pc_offset, CodeEmitInfo* cinfo);
 103   void add_debug_info_for_branch(CodeEmitInfo* info);
 104   void add_debug_info_for_div0(int pc_offset, CodeEmitInfo* cinfo);
 105   void add_debug_info_for_div0_here(CodeEmitInfo* info);
 106   ImplicitNullCheckStub* add_debug_info_for_null_check(int pc_offset, CodeEmitInfo* cinfo);
 107   ImplicitNullCheckStub* add_debug_info_for_null_check_here(CodeEmitInfo* info);
 108 
 109   void set_24bit_FPU();
 110   void reset_FPU();
 111   void fpop();
 112   void fxch(int i);
 113   void fld(int i);
 114   void ffree(int i);
 115 
 116   void breakpoint();
 117   void push(LIR_Opr opr);
 118   void pop(LIR_Opr opr);
 119 
 120   void getsp(LIR_Opr opr);
 121   void getfp(LIR_Opr opr);
 122 
 123   // patching
 124   void append_patching_stub(PatchingStub* stub);
 125   void patching_epilog(PatchingStub* patch, LIR_PatchCode patch_code, Register obj, CodeEmitInfo* info);
 126 
 127   void comp_op(LIR_Condition condition, LIR_Opr src, LIR_Opr result, LIR_Op2* op);
 128 
 129   PatchingStub::PatchID patching_id(CodeEmitInfo* info);
 130 
 131  public:
 132   LIR_Assembler(Compilation* c);
 133   ~LIR_Assembler();
 134   C1_MacroAssembler* masm() const                { return _masm; }
 135   Compilation* compilation() const               { return _compilation; }
 136   ciMethod* method() const                       { return compilation()->method(); }
 137 
 138   CodeOffsets* offsets() const                   { return _compilation->offsets(); }
 139   int code_offset() const;
 140   address pc() const;
 141 
 142   int  initial_frame_size_in_bytes() const;


 251 
 252   void rt_call(LIR_Opr result, address dest, const LIR_OprList* args, LIR_Opr tmp, CodeEmitInfo* info);
 253 
 254   void membar();
 255   void membar_acquire();
 256   void membar_release();
 257   void membar_loadload();
 258   void membar_storestore();
 259   void membar_loadstore();
 260   void membar_storeload();
 261   void on_spin_wait();
 262   void get_thread(LIR_Opr result);
 263 
 264   void verify_oop_map(CodeEmitInfo* info);
 265 
 266   void atomic_op(LIR_Code code, LIR_Opr src, LIR_Opr data, LIR_Opr dest, LIR_Opr tmp);
 267 
 268 #include CPU_HEADER(c1_LIRAssembler)
 269 
 270  public:
 271   int nr_immediate_oops_patched() const { return _immediate_oops_patched; }
 272 
 273   static int call_stub_size() {
 274     if (UseAOT) {
 275       return _call_stub_size + _call_aot_stub_size;
 276     } else {
 277       return _call_stub_size;
 278     }
 279   }
 280 
 281   static int exception_handler_size() {
 282     return _exception_handler_size;
 283   }
 284 
 285   static int deopt_handler_size() {
 286     return _deopt_handler_size;
 287   }
 288 };
 289 
 290 #endif // SHARE_C1_C1_LIRASSEMBLER_HPP
< prev index next >