hotspot/src/share/vm/interpreter/templateTable.hpp

Print this page
rev 611 : Merge


  68   void      generate(InterpreterMacroAssembler* masm);
  69 };
  70 
  71 
  72 // The TemplateTable defines all Templates and provides accessor functions
  73 // to get the template for a given bytecode.
  74 
  75 class TemplateTable: AllStatic {
  76  public:
  77   enum Operation { add, sub, mul, div, rem, _and, _or, _xor, shl, shr, ushr };
  78   enum Condition { equal, not_equal, less, less_equal, greater, greater_equal };
  79   
  80  private:
  81   static bool            _is_initialized;        // true if TemplateTable has been initialized
  82   static Template        _template_table     [Bytecodes::number_of_codes];
  83   static Template        _template_table_wide[Bytecodes::number_of_codes];
  84 
  85   static Template*       _desc;                  // the current template to be generated
  86   static Bytecodes::Code bytecode()              { return _desc->bytecode(); }
  87 

  88  public:
  89   //%note templates_1
  90   static InterpreterMacroAssembler* _masm;       // the assembler used when generating templates
  91 
  92  private:
  93 
  94   // special registers
  95   static inline Address at_bcp(int offset);
  96 
  97   // helpers
  98   static void unimplemented_bc();
  99   static void patch_bytecode(Bytecodes::Code bc, Register scratch1,
 100                              Register scratch2, bool load_bc_in_scratch = true);
 101 
 102   // C calls
 103   static void call_VM(Register oop_result, address entry_point);
 104   static void call_VM(Register oop_result, address entry_point, Register arg_1);
 105   static void call_VM(Register oop_result, address entry_point, Register arg_1, Register arg_2);
 106   static void call_VM(Register oop_result, address entry_point, Register arg_1, Register arg_2, Register arg_3);
 107 




  68   void      generate(InterpreterMacroAssembler* masm);
  69 };
  70 
  71 
  72 // The TemplateTable defines all Templates and provides accessor functions
  73 // to get the template for a given bytecode.
  74 
  75 class TemplateTable: AllStatic {
  76  public:
  77   enum Operation { add, sub, mul, div, rem, _and, _or, _xor, shl, shr, ushr };
  78   enum Condition { equal, not_equal, less, less_equal, greater, greater_equal };
  79   
  80  private:
  81   static bool            _is_initialized;        // true if TemplateTable has been initialized
  82   static Template        _template_table     [Bytecodes::number_of_codes];
  83   static Template        _template_table_wide[Bytecodes::number_of_codes];
  84 
  85   static Template*       _desc;                  // the current template to be generated
  86   static Bytecodes::Code bytecode()              { return _desc->bytecode(); }
  87 
  88   static BarrierSet*     _bs;                    // Cache the barrier set.
  89  public:
  90   //%note templates_1
  91   static InterpreterMacroAssembler* _masm;       // the assembler used when generating templates
  92 
  93  private:
  94 
  95   // special registers
  96   static inline Address at_bcp(int offset);
  97 
  98   // helpers
  99   static void unimplemented_bc();
 100   static void patch_bytecode(Bytecodes::Code bc, Register scratch1,
 101                              Register scratch2, bool load_bc_in_scratch = true);
 102 
 103   // C calls
 104   static void call_VM(Register oop_result, address entry_point);
 105   static void call_VM(Register oop_result, address entry_point, Register arg_1);
 106   static void call_VM(Register oop_result, address entry_point, Register arg_1, Register arg_2);
 107   static void call_VM(Register oop_result, address entry_point, Register arg_1, Register arg_2, Register arg_3);
 108