1 /*
2 * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 // A frame represents a physical stack frame (an activation). Frames can be
26 // C or Java frames, and the Java frames can be interpreted or compiled.
27 // In contrast, vframes represent source-level activations, so that one physical frame
28 // can correspond to multiple source level frames because of inlining.
29 // A frame is comprised of {pc, fp, sp}
30 // ------------------------------ Asm interpreter ----------------------------------------
31 // Layout of asm interpreter frame:
32 // [expression stack ] * <- sp
33 // [monitors ] \
34 // ... | monitor block size
35 // [monitors ] /
36 // [monitor block size ]
37 // [byte code index/pointr] = bcx() bcx_offset
38 // [pointer to locals ] = locals() locals_offset
39 // [constant pool cache ] = cache() cache_offset
40 // [methodData ] = mdp() mdx_offset
41 // [methodOop ] = method() method_offset
42 // [last sp ] = last_sp() last_sp_offset
43 // [old stack pointer ] (sender_sp) sender_sp_offset
44 // [old frame pointer ] <- fp = link()
182
183 // accessors for the instance variables
184 intptr_t* fp() const { return _fp; }
185
186 inline address* sender_pc_addr() const;
187
188 // return address of param, zero origin index.
189 inline address* native_param_addr(int idx) const;
190
191 // expression stack tos if we are nested in a java call
192 intptr_t* interpreter_frame_last_sp() const;
193
194 #ifndef CC_INTERP
195 // deoptimization support
196 void interpreter_frame_set_last_sp(intptr_t* sp);
197 #endif // CC_INTERP
198
199 #ifdef CC_INTERP
200 inline interpreterState get_interpreterState() const;
201 #endif // CC_INTERP
|
1 /*
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef CPU_X86_VM_FRAME_X86_HPP
26 #define CPU_X86_VM_FRAME_X86_HPP
27
28 #include "runtime/synchronizer.hpp"
29 #include "utilities/top.hpp"
30
31 // A frame represents a physical stack frame (an activation). Frames can be
32 // C or Java frames, and the Java frames can be interpreted or compiled.
33 // In contrast, vframes represent source-level activations, so that one physical frame
34 // can correspond to multiple source level frames because of inlining.
35 // A frame is comprised of {pc, fp, sp}
36 // ------------------------------ Asm interpreter ----------------------------------------
37 // Layout of asm interpreter frame:
38 // [expression stack ] * <- sp
39 // [monitors ] \
40 // ... | monitor block size
41 // [monitors ] /
42 // [monitor block size ]
43 // [byte code index/pointr] = bcx() bcx_offset
44 // [pointer to locals ] = locals() locals_offset
45 // [constant pool cache ] = cache() cache_offset
46 // [methodData ] = mdp() mdx_offset
47 // [methodOop ] = method() method_offset
48 // [last sp ] = last_sp() last_sp_offset
49 // [old stack pointer ] (sender_sp) sender_sp_offset
50 // [old frame pointer ] <- fp = link()
188
189 // accessors for the instance variables
190 intptr_t* fp() const { return _fp; }
191
192 inline address* sender_pc_addr() const;
193
194 // return address of param, zero origin index.
195 inline address* native_param_addr(int idx) const;
196
197 // expression stack tos if we are nested in a java call
198 intptr_t* interpreter_frame_last_sp() const;
199
200 #ifndef CC_INTERP
201 // deoptimization support
202 void interpreter_frame_set_last_sp(intptr_t* sp);
203 #endif // CC_INTERP
204
205 #ifdef CC_INTERP
206 inline interpreterState get_interpreterState() const;
207 #endif // CC_INTERP
208
209 #endif // CPU_X86_VM_FRAME_X86_HPP
|