annotate src/cpu/sparc/vm/frame_sparc.hpp @ 21124:019ae3824a4e

[SPARC] Set MaxVectorSize=8
author Stefan Anzinger <stefan.anzinger@oracle.com>
date Mon, 27 Apr 2015 16:02:54 +0200
parents 7f77d17d0f13
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3899
diff changeset
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 *
a61af66fc99e Initial load
duke
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 *
a61af66fc99e Initial load
duke
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 *
a61af66fc99e Initial load
duke
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 *
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
21 * questions.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
24
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1787
diff changeset
25 #ifndef CPU_SPARC_VM_FRAME_SPARC_HPP
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1787
diff changeset
26 #define CPU_SPARC_VM_FRAME_SPARC_HPP
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1787
diff changeset
27
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1787
diff changeset
28 #include "runtime/synchronizer.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1787
diff changeset
29 #include "utilities/top.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1787
diff changeset
30
0
a61af66fc99e Initial load
duke
parents:
diff changeset
31 // A frame represents a physical stack frame (an activation). Frames can be
a61af66fc99e Initial load
duke
parents:
diff changeset
32 // C or Java frames, and the Java frames can be interpreted or compiled.
a61af66fc99e Initial load
duke
parents:
diff changeset
33 // In contrast, vframes represent source-level activations, so that one physical frame
a61af66fc99e Initial load
duke
parents:
diff changeset
34 // can correspond to multiple source level frames because of inlining.
a61af66fc99e Initial load
duke
parents:
diff changeset
35 // A frame is comprised of {pc, sp, younger_sp}
a61af66fc99e Initial load
duke
parents:
diff changeset
36
a61af66fc99e Initial load
duke
parents:
diff changeset
37
a61af66fc99e Initial load
duke
parents:
diff changeset
38 // Layout of asm interpreter frame:
a61af66fc99e Initial load
duke
parents:
diff changeset
39 //
a61af66fc99e Initial load
duke
parents:
diff changeset
40 // 0xfffffff
a61af66fc99e Initial load
duke
parents:
diff changeset
41 // ......
a61af66fc99e Initial load
duke
parents:
diff changeset
42 // [last extra incoming arg, (local # Nargs > 6 ? Nargs-1 : undef)]
a61af66fc99e Initial load
duke
parents:
diff changeset
43 // .. Note: incoming args are copied to local frame area upon entry
a61af66fc99e Initial load
duke
parents:
diff changeset
44 // [first extra incoming arg, (local # Nargs > 6 ? 6 : undef)]
a61af66fc99e Initial load
duke
parents:
diff changeset
45 // [6 words for C-arg storage (unused)] Are this and next one really needed?
a61af66fc99e Initial load
duke
parents:
diff changeset
46 // [C-aggregate-word (unused)] Yes, if want extra params to be in same place as C convention
a61af66fc99e Initial load
duke
parents:
diff changeset
47 // [16 words for register saving] <--- FP
a61af66fc99e Initial load
duke
parents:
diff changeset
48 // [interpreter_frame_vm_locals ] (see below)
a61af66fc99e Initial load
duke
parents:
diff changeset
49
a61af66fc99e Initial load
duke
parents:
diff changeset
50 // Note: Llocals is always double-word aligned
a61af66fc99e Initial load
duke
parents:
diff changeset
51 // [first local i.e. local # 0] <-- Llocals
a61af66fc99e Initial load
duke
parents:
diff changeset
52 // ...
a61af66fc99e Initial load
duke
parents:
diff changeset
53 // [last local, i.e. local # Nlocals-1]
a61af66fc99e Initial load
duke
parents:
diff changeset
54
a61af66fc99e Initial load
duke
parents:
diff changeset
55 // [monitors ]
a61af66fc99e Initial load
duke
parents:
diff changeset
56 // ....
a61af66fc99e Initial load
duke
parents:
diff changeset
57 // [monitors ] <-- Lmonitors (same as Llocals + 6*4 if none)
a61af66fc99e Initial load
duke
parents:
diff changeset
58 // (must be double-word aligned because
a61af66fc99e Initial load
duke
parents:
diff changeset
59 // monitor element size is constrained to
a61af66fc99e Initial load
duke
parents:
diff changeset
60 // doubleword)
a61af66fc99e Initial load
duke
parents:
diff changeset
61 //
a61af66fc99e Initial load
duke
parents:
diff changeset
62 // <-- Lesp (points 1 past TOS)
a61af66fc99e Initial load
duke
parents:
diff changeset
63 // [bottom word used for stack ]
a61af66fc99e Initial load
duke
parents:
diff changeset
64 // ...
a61af66fc99e Initial load
duke
parents:
diff changeset
65 // [top word used for stack] (first word of stack is double-word aligned)
a61af66fc99e Initial load
duke
parents:
diff changeset
66
a61af66fc99e Initial load
duke
parents:
diff changeset
67 // [space for outgoing args (conservatively allocated as max_stack - 6 + interpreter_frame_extra_outgoing_argument_words)]
a61af66fc99e Initial load
duke
parents:
diff changeset
68 // [6 words for C-arg storage]
a61af66fc99e Initial load
duke
parents:
diff changeset
69 // [C-aggregate-word (unused)]
a61af66fc99e Initial load
duke
parents:
diff changeset
70 // [16 words for register saving] <--- SP
a61af66fc99e Initial load
duke
parents:
diff changeset
71 // ...
a61af66fc99e Initial load
duke
parents:
diff changeset
72 // 0x0000000
a61af66fc99e Initial load
duke
parents:
diff changeset
73 //
a61af66fc99e Initial load
duke
parents:
diff changeset
74 // The in registers and local registers are preserved in a block at SP.
a61af66fc99e Initial load
duke
parents:
diff changeset
75 //
a61af66fc99e Initial load
duke
parents:
diff changeset
76 // The first six in registers (I0..I5) hold the first six locals.
a61af66fc99e Initial load
duke
parents:
diff changeset
77 // The locals are used as follows:
a61af66fc99e Initial load
duke
parents:
diff changeset
78 // Lesp first free element of expression stack
a61af66fc99e Initial load
duke
parents:
diff changeset
79 // (which grows towards __higher__ addresses)
a61af66fc99e Initial load
duke
parents:
diff changeset
80 // Lbcp is set to address of bytecode to execute
a61af66fc99e Initial load
duke
parents:
diff changeset
81 // It is accessed in the frame under the name "bcx".
a61af66fc99e Initial load
duke
parents:
diff changeset
82 // It may at times (during GC) be an index instead.
a61af66fc99e Initial load
duke
parents:
diff changeset
83 // Lmethod the method being interpreted
a61af66fc99e Initial load
duke
parents:
diff changeset
84 // Llocals the base pointer for accessing the locals array
a61af66fc99e Initial load
duke
parents:
diff changeset
85 // (lower-numbered locals have lower addresses)
a61af66fc99e Initial load
duke
parents:
diff changeset
86 // Lmonitors the base pointer for accessing active monitors
a61af66fc99e Initial load
duke
parents:
diff changeset
87 // Lcache a saved pointer to the method's constant pool cache
a61af66fc99e Initial load
duke
parents:
diff changeset
88 //
a61af66fc99e Initial load
duke
parents:
diff changeset
89 //
a61af66fc99e Initial load
duke
parents:
diff changeset
90 // When calling out to another method,
a61af66fc99e Initial load
duke
parents:
diff changeset
91 // G5_method is set to method to call, G5_inline_cache_klass may be set,
a61af66fc99e Initial load
duke
parents:
diff changeset
92 // parameters are put in O registers, and also extra parameters
a61af66fc99e Initial load
duke
parents:
diff changeset
93 // must be cleverly copied from the top of stack to the outgoing param area in the frame,
a61af66fc99e Initial load
duke
parents:
diff changeset
94 // ------------------------------ C++ interpreter ----------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
95 // Layout of C++ interpreter frame:
a61af66fc99e Initial load
duke
parents:
diff changeset
96 //
a61af66fc99e Initial load
duke
parents:
diff changeset
97
a61af66fc99e Initial load
duke
parents:
diff changeset
98
a61af66fc99e Initial load
duke
parents:
diff changeset
99
a61af66fc99e Initial load
duke
parents:
diff changeset
100 // All frames:
a61af66fc99e Initial load
duke
parents:
diff changeset
101
a61af66fc99e Initial load
duke
parents:
diff changeset
102 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
103
a61af66fc99e Initial load
duke
parents:
diff changeset
104 enum {
a61af66fc99e Initial load
duke
parents:
diff changeset
105 // normal return address is 2 words past PC
a61af66fc99e Initial load
duke
parents:
diff changeset
106 pc_return_offset = 2 * BytesPerInstWord,
a61af66fc99e Initial load
duke
parents:
diff changeset
107
a61af66fc99e Initial load
duke
parents:
diff changeset
108 // size of each block, in order of increasing address:
a61af66fc99e Initial load
duke
parents:
diff changeset
109 register_save_words = 16,
a61af66fc99e Initial load
duke
parents:
diff changeset
110 #ifdef _LP64
a61af66fc99e Initial load
duke
parents:
diff changeset
111 callee_aggregate_return_pointer_words = 0,
a61af66fc99e Initial load
duke
parents:
diff changeset
112 #else
a61af66fc99e Initial load
duke
parents:
diff changeset
113 callee_aggregate_return_pointer_words = 1,
a61af66fc99e Initial load
duke
parents:
diff changeset
114 #endif
a61af66fc99e Initial load
duke
parents:
diff changeset
115 callee_register_argument_save_area_words = 6,
a61af66fc99e Initial load
duke
parents:
diff changeset
116 // memory_parameter_words = <arbitrary>,
a61af66fc99e Initial load
duke
parents:
diff changeset
117
a61af66fc99e Initial load
duke
parents:
diff changeset
118 // offset of each block, in order of increasing address:
a61af66fc99e Initial load
duke
parents:
diff changeset
119 // (note: callee_register_argument_save_area_words == Assembler::n_register_parameters)
a61af66fc99e Initial load
duke
parents:
diff changeset
120 register_save_words_sp_offset = 0,
a61af66fc99e Initial load
duke
parents:
diff changeset
121 callee_aggregate_return_pointer_sp_offset = register_save_words_sp_offset + register_save_words,
a61af66fc99e Initial load
duke
parents:
diff changeset
122 callee_register_argument_save_area_sp_offset = callee_aggregate_return_pointer_sp_offset + callee_aggregate_return_pointer_words,
a61af66fc99e Initial load
duke
parents:
diff changeset
123 memory_parameter_word_sp_offset = callee_register_argument_save_area_sp_offset + callee_register_argument_save_area_words,
a61af66fc99e Initial load
duke
parents:
diff changeset
124 varargs_offset = memory_parameter_word_sp_offset
a61af66fc99e Initial load
duke
parents:
diff changeset
125 };
a61af66fc99e Initial load
duke
parents:
diff changeset
126
a61af66fc99e Initial load
duke
parents:
diff changeset
127 private:
a61af66fc99e Initial load
duke
parents:
diff changeset
128 intptr_t* _younger_sp; // optional SP of callee (used to locate O7)
a61af66fc99e Initial load
duke
parents:
diff changeset
129 int _sp_adjustment_by_callee; // adjustment in words to SP by callee for making locals contiguous
a61af66fc99e Initial load
duke
parents:
diff changeset
130
a61af66fc99e Initial load
duke
parents:
diff changeset
131 // Note: On SPARC, unlike Intel, the saved PC for a stack frame
a61af66fc99e Initial load
duke
parents:
diff changeset
132 // is stored at a __variable__ distance from that frame's SP.
a61af66fc99e Initial load
duke
parents:
diff changeset
133 // (In fact, it may be in the register save area of the callee frame,
a61af66fc99e Initial load
duke
parents:
diff changeset
134 // but that fact need not bother us.) Thus, we must store the
a61af66fc99e Initial load
duke
parents:
diff changeset
135 // address of that saved PC explicitly. On the other hand, SPARC
a61af66fc99e Initial load
duke
parents:
diff changeset
136 // stores the FP for a frame at a fixed offset from the frame's SP,
a61af66fc99e Initial load
duke
parents:
diff changeset
137 // so there is no need for a separate "frame::_fp" field.
a61af66fc99e Initial load
duke
parents:
diff changeset
138
a61af66fc99e Initial load
duke
parents:
diff changeset
139 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
140 // Accessors
a61af66fc99e Initial load
duke
parents:
diff changeset
141
a61af66fc99e Initial load
duke
parents:
diff changeset
142 intptr_t* younger_sp() const {
a61af66fc99e Initial load
duke
parents:
diff changeset
143 assert(_younger_sp != NULL, "frame must possess a younger_sp");
a61af66fc99e Initial load
duke
parents:
diff changeset
144 return _younger_sp;
a61af66fc99e Initial load
duke
parents:
diff changeset
145 }
a61af66fc99e Initial load
duke
parents:
diff changeset
146
a61af66fc99e Initial load
duke
parents:
diff changeset
147 int callee_sp_adjustment() const { return _sp_adjustment_by_callee; }
a61af66fc99e Initial load
duke
parents:
diff changeset
148 void set_sp_adjustment_by_callee(int number_of_words) { _sp_adjustment_by_callee = number_of_words; }
a61af66fc99e Initial load
duke
parents:
diff changeset
149
a61af66fc99e Initial load
duke
parents:
diff changeset
150 // Constructors
a61af66fc99e Initial load
duke
parents:
diff changeset
151
a61af66fc99e Initial load
duke
parents:
diff changeset
152 // This constructor relies on the fact that the creator of a frame
a61af66fc99e Initial load
duke
parents:
diff changeset
153 // has flushed register windows which the frame will refer to, and
a61af66fc99e Initial load
duke
parents:
diff changeset
154 // that those register windows will not be reloaded until the frame is
a61af66fc99e Initial load
duke
parents:
diff changeset
155 // done reading and writing the stack. Moreover, if the "younger_sp"
a61af66fc99e Initial load
duke
parents:
diff changeset
156 // argument points into the register save area of the next younger
a61af66fc99e Initial load
duke
parents:
diff changeset
157 // frame (though it need not), the register window for that next
a61af66fc99e Initial load
duke
parents:
diff changeset
158 // younger frame must also stay flushed. (The caller is responsible
a61af66fc99e Initial load
duke
parents:
diff changeset
159 // for ensuring this.)
a61af66fc99e Initial load
duke
parents:
diff changeset
160
a61af66fc99e Initial load
duke
parents:
diff changeset
161 frame(intptr_t* sp, intptr_t* younger_sp, bool younger_frame_adjusted_stack = false);
a61af66fc99e Initial load
duke
parents:
diff changeset
162
a61af66fc99e Initial load
duke
parents:
diff changeset
163 // make a deficient frame which doesn't know where its PC is:
a61af66fc99e Initial load
duke
parents:
diff changeset
164 enum unpatchable_t { unpatchable };
a61af66fc99e Initial load
duke
parents:
diff changeset
165 frame(intptr_t* sp, unpatchable_t, address pc = NULL, CodeBlob* cb = NULL);
a61af66fc99e Initial load
duke
parents:
diff changeset
166
a61af66fc99e Initial load
duke
parents:
diff changeset
167 // Walk from sp outward looking for old_sp, and return old_sp's predecessor
a61af66fc99e Initial load
duke
parents:
diff changeset
168 // (i.e. return the sp from the frame where old_sp is the fp).
a61af66fc99e Initial load
duke
parents:
diff changeset
169 // Register windows are assumed to be flushed for the stack in question.
a61af66fc99e Initial load
duke
parents:
diff changeset
170
a61af66fc99e Initial load
duke
parents:
diff changeset
171 static intptr_t* next_younger_sp_or_null(intptr_t* old_sp, intptr_t* sp);
a61af66fc99e Initial load
duke
parents:
diff changeset
172
a61af66fc99e Initial load
duke
parents:
diff changeset
173 // Return true if sp is a younger sp in the stack described by valid_sp.
a61af66fc99e Initial load
duke
parents:
diff changeset
174 static bool is_valid_stack_pointer(intptr_t* valid_sp, intptr_t* sp);
a61af66fc99e Initial load
duke
parents:
diff changeset
175
a61af66fc99e Initial load
duke
parents:
diff changeset
176 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
177 // accessors for the instance variables
a61af66fc99e Initial load
duke
parents:
diff changeset
178 intptr_t* fp() const { return (intptr_t*) ((intptr_t)(sp()[FP->sp_offset_in_saved_window()]) + STACK_BIAS ); }
a61af66fc99e Initial load
duke
parents:
diff changeset
179
a61af66fc99e Initial load
duke
parents:
diff changeset
180 // All frames
a61af66fc99e Initial load
duke
parents:
diff changeset
181
a61af66fc99e Initial load
duke
parents:
diff changeset
182 intptr_t* fp_addr_at(int index) const { return &fp()[index]; }
a61af66fc99e Initial load
duke
parents:
diff changeset
183 intptr_t* sp_addr_at(int index) const { return &sp()[index]; }
a61af66fc99e Initial load
duke
parents:
diff changeset
184 intptr_t fp_at( int index) const { return *fp_addr_at(index); }
a61af66fc99e Initial load
duke
parents:
diff changeset
185 intptr_t sp_at( int index) const { return *sp_addr_at(index); }
a61af66fc99e Initial load
duke
parents:
diff changeset
186
a61af66fc99e Initial load
duke
parents:
diff changeset
187 private:
a61af66fc99e Initial load
duke
parents:
diff changeset
188 inline address* I7_addr() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
189 inline address* O7_addr() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
190
a61af66fc99e Initial load
duke
parents:
diff changeset
191 inline address* I0_addr() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
192 inline address* O0_addr() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
193 intptr_t* younger_sp_addr_at(int index) const { return &younger_sp()[index]; }
a61af66fc99e Initial load
duke
parents:
diff changeset
194
a61af66fc99e Initial load
duke
parents:
diff changeset
195 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
196 // access to SPARC arguments and argument registers
a61af66fc99e Initial load
duke
parents:
diff changeset
197
a61af66fc99e Initial load
duke
parents:
diff changeset
198 // Assumes reg is an in/local register
a61af66fc99e Initial load
duke
parents:
diff changeset
199 intptr_t* register_addr(Register reg) const {
a61af66fc99e Initial load
duke
parents:
diff changeset
200 return sp_addr_at(reg->sp_offset_in_saved_window());
a61af66fc99e Initial load
duke
parents:
diff changeset
201 }
a61af66fc99e Initial load
duke
parents:
diff changeset
202
a61af66fc99e Initial load
duke
parents:
diff changeset
203 // Assumes reg is an out register
a61af66fc99e Initial load
duke
parents:
diff changeset
204 intptr_t* out_register_addr(Register reg) const {
a61af66fc99e Initial load
duke
parents:
diff changeset
205 return younger_sp_addr_at(reg->after_save()->sp_offset_in_saved_window());
a61af66fc99e Initial load
duke
parents:
diff changeset
206 }
a61af66fc99e Initial load
duke
parents:
diff changeset
207
a61af66fc99e Initial load
duke
parents:
diff changeset
208
a61af66fc99e Initial load
duke
parents:
diff changeset
209 // Interpreter frames
a61af66fc99e Initial load
duke
parents:
diff changeset
210
a61af66fc99e Initial load
duke
parents:
diff changeset
211 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
212 // Asm interpreter
a61af66fc99e Initial load
duke
parents:
diff changeset
213 #ifndef CC_INTERP
a61af66fc99e Initial load
duke
parents:
diff changeset
214 enum interpreter_frame_vm_locals {
a61af66fc99e Initial load
duke
parents:
diff changeset
215 // 2 words, also used to save float regs across calls to C
a61af66fc99e Initial load
duke
parents:
diff changeset
216 interpreter_frame_d_scratch_fp_offset = -2,
a61af66fc99e Initial load
duke
parents:
diff changeset
217 interpreter_frame_l_scratch_fp_offset = -4,
a61af66fc99e Initial load
duke
parents:
diff changeset
218 interpreter_frame_padding_offset = -5, // for native calls only
a61af66fc99e Initial load
duke
parents:
diff changeset
219 interpreter_frame_oop_temp_offset = -6, // for native calls only
a61af66fc99e Initial load
duke
parents:
diff changeset
220 interpreter_frame_vm_locals_fp_offset = -6, // should be same as above, and should be zero mod 8
a61af66fc99e Initial load
duke
parents:
diff changeset
221
a61af66fc99e Initial load
duke
parents:
diff changeset
222 interpreter_frame_vm_local_words = -interpreter_frame_vm_locals_fp_offset,
a61af66fc99e Initial load
duke
parents:
diff changeset
223
a61af66fc99e Initial load
duke
parents:
diff changeset
224
a61af66fc99e Initial load
duke
parents:
diff changeset
225 // interpreter frame set-up needs to save 2 extra words in outgoing param area
a61af66fc99e Initial load
duke
parents:
diff changeset
226 // for class and jnienv arguments for native stubs (see nativeStubGen_sparc.cpp_
a61af66fc99e Initial load
duke
parents:
diff changeset
227
a61af66fc99e Initial load
duke
parents:
diff changeset
228 interpreter_frame_extra_outgoing_argument_words = 2
a61af66fc99e Initial load
duke
parents:
diff changeset
229 };
a61af66fc99e Initial load
duke
parents:
diff changeset
230 #else
a61af66fc99e Initial load
duke
parents:
diff changeset
231 enum interpreter_frame_vm_locals {
a61af66fc99e Initial load
duke
parents:
diff changeset
232 // 2 words, also used to save float regs across calls to C
a61af66fc99e Initial load
duke
parents:
diff changeset
233 interpreter_state_ptr_offset = 0, // Is in L0 (Lstate) in save area
a61af66fc99e Initial load
duke
parents:
diff changeset
234 interpreter_frame_mirror_offset = 1, // Is in L1 (Lmirror) in save area (for native calls only)
a61af66fc99e Initial load
duke
parents:
diff changeset
235
a61af66fc99e Initial load
duke
parents:
diff changeset
236 // interpreter frame set-up needs to save 2 extra words in outgoing param area
a61af66fc99e Initial load
duke
parents:
diff changeset
237 // for class and jnienv arguments for native stubs (see nativeStubGen_sparc.cpp_
a61af66fc99e Initial load
duke
parents:
diff changeset
238
a61af66fc99e Initial load
duke
parents:
diff changeset
239 interpreter_frame_extra_outgoing_argument_words = 2
a61af66fc99e Initial load
duke
parents:
diff changeset
240 };
a61af66fc99e Initial load
duke
parents:
diff changeset
241 #endif /* CC_INTERP */
a61af66fc99e Initial load
duke
parents:
diff changeset
242
a61af66fc99e Initial load
duke
parents:
diff changeset
243 enum compiler_frame_fixed_locals {
3899
c124e2e7463e 7083786: dead various dead chunks of code
never
parents: 1972
diff changeset
244 compiler_frame_vm_locals_fp_offset = -2
0
a61af66fc99e Initial load
duke
parents:
diff changeset
245 };
a61af66fc99e Initial load
duke
parents:
diff changeset
246
a61af66fc99e Initial load
duke
parents:
diff changeset
247 private:
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3899
diff changeset
248 ConstantPoolCache** interpreter_frame_cpoolcache_addr() const;
0
a61af66fc99e Initial load
duke
parents:
diff changeset
249
a61af66fc99e Initial load
duke
parents:
diff changeset
250 #ifndef CC_INTERP
a61af66fc99e Initial load
duke
parents:
diff changeset
251
a61af66fc99e Initial load
duke
parents:
diff changeset
252 // where Lmonitors is saved:
7199
cd3d6a6b95d9 8003240: x86: move MacroAssembler into separate file
twisti
parents: 6725
diff changeset
253 inline BasicObjectLock** interpreter_frame_monitors_addr() const;
cd3d6a6b95d9 8003240: x86: move MacroAssembler into separate file
twisti
parents: 6725
diff changeset
254 inline intptr_t** interpreter_frame_esp_addr() const;
0
a61af66fc99e Initial load
duke
parents:
diff changeset
255
a61af66fc99e Initial load
duke
parents:
diff changeset
256 inline void interpreter_frame_set_tos_address(intptr_t* x);
a61af66fc99e Initial load
duke
parents:
diff changeset
257
a61af66fc99e Initial load
duke
parents:
diff changeset
258 // monitors:
a61af66fc99e Initial load
duke
parents:
diff changeset
259
a61af66fc99e Initial load
duke
parents:
diff changeset
260 // next two fns read and write Lmonitors value,
a61af66fc99e Initial load
duke
parents:
diff changeset
261 private:
17940
7f77d17d0f13 8042059: Various fixes to linux/sparc
mikael
parents: 7199
diff changeset
262 BasicObjectLock* interpreter_frame_monitors() const;
7f77d17d0f13 8042059: Various fixes to linux/sparc
mikael
parents: 7199
diff changeset
263 void interpreter_frame_set_monitors(BasicObjectLock* monitors);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
264 #else
a61af66fc99e Initial load
duke
parents:
diff changeset
265 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
266 inline interpreterState get_interpreterState() const {
a61af66fc99e Initial load
duke
parents:
diff changeset
267 return ((interpreterState)sp_at(interpreter_state_ptr_offset));
a61af66fc99e Initial load
duke
parents:
diff changeset
268 }
a61af66fc99e Initial load
duke
parents:
diff changeset
269
a61af66fc99e Initial load
duke
parents:
diff changeset
270 #endif /* CC_INTERP */
a61af66fc99e Initial load
duke
parents:
diff changeset
271
a61af66fc99e Initial load
duke
parents:
diff changeset
272 public:
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1787
diff changeset
273
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1787
diff changeset
274 #endif // CPU_SPARC_VM_FRAME_SPARC_HPP