81 const char* group() const { return _group; }
82 const char* name() const { return _name; }
83 int index() const { return _index; }
84 address begin() const { return _begin; }
85 address end() const { return _end; }
86 int size_in_bytes() const { return _end - _begin; }
87 bool contains(address pc) const { return _begin <= pc && pc < _end; }
88 void print_on(outputStream* st) const;
89 void print() const { print_on(tty); }
90 };
91
92 // The base class for all stub-generating code generators.
93 // Provides utility functions.
94
95 class StubCodeGenerator: public StackObj {
96 protected:
97 MacroAssembler* _masm;
98
99 StubCodeDesc* _first_stub;
100 StubCodeDesc* _last_stub;
101
102 public:
103 StubCodeGenerator(CodeBuffer* code);
104 ~StubCodeGenerator();
105
106 MacroAssembler* assembler() const { return _masm; }
107
108 virtual void stub_prolog(StubCodeDesc* cdesc); // called by StubCodeMark constructor
109 virtual void stub_epilog(StubCodeDesc* cdesc); // called by StubCodeMark destructor
110 };
111
112
113 // Stack-allocated helper class used to assciate a stub code with a name.
114 // All stub code generating functions that use a StubCodeMark will be registered
115 // in the global StubCodeDesc list and the generated stub code can be identified
116 // later via an address pointing into it.
117
118 class StubCodeMark: public StackObj {
119 protected:
120 StubCodeGenerator* _cgen;
121 StubCodeDesc* _cdesc;
122
123 public:
|
81 const char* group() const { return _group; }
82 const char* name() const { return _name; }
83 int index() const { return _index; }
84 address begin() const { return _begin; }
85 address end() const { return _end; }
86 int size_in_bytes() const { return _end - _begin; }
87 bool contains(address pc) const { return _begin <= pc && pc < _end; }
88 void print_on(outputStream* st) const;
89 void print() const { print_on(tty); }
90 };
91
92 // The base class for all stub-generating code generators.
93 // Provides utility functions.
94
95 class StubCodeGenerator: public StackObj {
96 protected:
97 MacroAssembler* _masm;
98
99 StubCodeDesc* _first_stub;
100 StubCodeDesc* _last_stub;
101 bool _print_code;
102
103 public:
104 StubCodeGenerator(CodeBuffer* code, bool print_code = false);
105 ~StubCodeGenerator();
106
107 MacroAssembler* assembler() const { return _masm; }
108
109 virtual void stub_prolog(StubCodeDesc* cdesc); // called by StubCodeMark constructor
110 virtual void stub_epilog(StubCodeDesc* cdesc); // called by StubCodeMark destructor
111 };
112
113
114 // Stack-allocated helper class used to assciate a stub code with a name.
115 // All stub code generating functions that use a StubCodeMark will be registered
116 // in the global StubCodeDesc list and the generated stub code can be identified
117 // later via an address pointing into it.
118
119 class StubCodeMark: public StackObj {
120 protected:
121 StubCodeGenerator* _cgen;
122 StubCodeDesc* _cdesc;
123
124 public:
|