annotate src/cpu/ppc/vm/frame_ppc.hpp @ 14408:ec28f9c041ff

8019972: PPC64 (part 9): platform files for interpreter only VM. Summary: With this change the HotSpot core build works on Linux/PPC64. The VM succesfully executes simple test programs. Reviewed-by: kvn
author goetz
date Fri, 02 Aug 2013 16:46:45 +0200
parents
children 67fa91961822
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14408
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
1 /*
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
2 * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
3 * Copyright 2012, 2013 SAP AG. All rights reserved.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
5 *
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
6 * This code is free software; you can redistribute it and/or modify it
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
7 * under the terms of the GNU General Public License version 2 only, as
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
8 * published by the Free Software Foundation.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
9 *
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
10 * This code is distributed in the hope that it will be useful, but WITHOUT
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
13 * version 2 for more details (a copy is included in the LICENSE file that
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
14 * accompanied this code).
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
15 *
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
16 * You should have received a copy of the GNU General Public License version
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
17 * 2 along with this work; if not, write to the Free Software Foundation,
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
19 *
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
21 * or visit www.oracle.com if you need additional information or have any
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
22 * questions.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
23 *
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
24 */
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
25
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
26 #ifndef CPU_PPC_VM_FRAME_PPC_HPP
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
27 #define CPU_PPC_VM_FRAME_PPC_HPP
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
28
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
29 #include "runtime/synchronizer.hpp"
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
30 #include "utilities/top.hpp"
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
31
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
32 #ifndef CC_INTERP
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
33 #error "CC_INTERP must be defined on PPC64"
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
34 #endif
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
35
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
36 // C frame layout on PPC-64.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
37 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
38 // In this figure the stack grows upwards, while memory grows
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
39 // downwards. See "64-bit PowerPC ELF ABI Supplement Version 1.7",
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
40 // IBM Corp. (2003-10-29)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
41 // (http://math-atlas.sourceforge.net/devel/assembly/PPC-elf64abi-1.7.pdf).
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
42 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
43 // Square brackets denote stack regions possibly larger
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
44 // than a single 64 bit slot.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
45 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
46 // STACK:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
47 // 0 [C_FRAME] <-- SP after prolog (mod 16 = 0)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
48 // [C_FRAME] <-- SP before prolog
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
49 // ...
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
50 // [C_FRAME]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
51 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
52 // C_FRAME:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
53 // 0 [ABI_112]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
54 // 112 CARG_9: outgoing arg 9 (arg_1 ... arg_8 via gpr_3 ... gpr_{10})
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
55 // ...
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
56 // 40+M*8 CARG_M: outgoing arg M (M is the maximum of outgoing args taken over all call sites in the procedure)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
57 // local 1
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
58 // ...
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
59 // local N
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
60 // spill slot for vector reg (16 bytes aligned)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
61 // ...
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
62 // spill slot for vector reg
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
63 // alignment (4 or 12 bytes)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
64 // V SR_VRSAVE
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
65 // V+4 spill slot for GR
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
66 // ... ...
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
67 // spill slot for GR
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
68 // spill slot for FR
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
69 // ...
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
70 // spill slot for FR
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
71 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
72 // ABI_48:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
73 // 0 caller's SP
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
74 // 8 space for condition register (CR) for next call
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
75 // 16 space for link register (LR) for next call
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
76 // 24 reserved
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
77 // 32 reserved
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
78 // 40 space for TOC (=R2) register for next call
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
79 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
80 // ABI_112:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
81 // 0 [ABI_48]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
82 // 48 CARG_1: spill slot for outgoing arg 1. used by next callee.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
83 // ... ...
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
84 // 104 CARG_8: spill slot for outgoing arg 8. used by next callee.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
85 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
86
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
87 public:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
88
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
89 // C frame layout
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
90
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
91 enum {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
92 // stack alignment
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
93 alignment_in_bytes = 16,
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
94 // log_2(16*8 bits) = 7.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
95 log_2_of_alignment_in_bits = 7
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
96 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
97
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
98 // ABI_48:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
99 struct abi_48 {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
100 uint64_t callers_sp;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
101 uint64_t cr; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
102 uint64_t lr;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
103 uint64_t reserved1; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
104 uint64_t reserved2;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
105 uint64_t toc; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
106 // nothing to add here!
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
107 // aligned to frame::alignment_in_bytes (16)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
108 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
109
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
110 enum {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
111 abi_48_size = sizeof(abi_48)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
112 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
113
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
114 struct abi_112 : abi_48 {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
115 uint64_t carg_1;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
116 uint64_t carg_2; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
117 uint64_t carg_3;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
118 uint64_t carg_4; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
119 uint64_t carg_5;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
120 uint64_t carg_6; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
121 uint64_t carg_7;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
122 uint64_t carg_8; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
123 // aligned to frame::alignment_in_bytes (16)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
124 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
125
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
126 enum {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
127 abi_112_size = sizeof(abi_112)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
128 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
129
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
130 #define _abi(_component) \
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
131 (offset_of(frame::abi_112, _component))
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
132
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
133 struct abi_112_spill : abi_112 {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
134 // additional spill slots
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
135 uint64_t spill_ret;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
136 uint64_t spill_fret; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
137 // aligned to frame::alignment_in_bytes (16)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
138 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
139
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
140 enum {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
141 abi_112_spill_size = sizeof(abi_112_spill)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
142 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
143
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
144 #define _abi_112_spill(_component) \
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
145 (offset_of(frame::abi_112_spill, _component))
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
146
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
147 // non-volatile GPRs:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
148
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
149 struct spill_nonvolatiles {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
150 uint64_t r14;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
151 uint64_t r15; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
152 uint64_t r16;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
153 uint64_t r17; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
154 uint64_t r18;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
155 uint64_t r19; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
156 uint64_t r20;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
157 uint64_t r21; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
158 uint64_t r22;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
159 uint64_t r23; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
160 uint64_t r24;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
161 uint64_t r25; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
162 uint64_t r26;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
163 uint64_t r27; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
164 uint64_t r28;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
165 uint64_t r29; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
166 uint64_t r30;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
167 uint64_t r31; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
168
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
169 double f14;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
170 double f15;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
171 double f16;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
172 double f17;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
173 double f18;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
174 double f19;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
175 double f20;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
176 double f21;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
177 double f22;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
178 double f23;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
179 double f24;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
180 double f25;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
181 double f26;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
182 double f27;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
183 double f28;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
184 double f29;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
185 double f30;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
186 double f31;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
187
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
188 // aligned to frame::alignment_in_bytes (16)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
189 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
190
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
191 enum {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
192 spill_nonvolatiles_size = sizeof(spill_nonvolatiles)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
193 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
194
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
195 #define _spill_nonvolatiles_neg(_component) \
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
196 (int)(-frame::spill_nonvolatiles_size + offset_of(frame::spill_nonvolatiles, _component))
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
197
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
198 // Frame layout for the Java interpreter on PPC64.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
199 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
200 // This frame layout provides a C-like frame for every Java frame.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
201 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
202 // In these figures the stack grows upwards, while memory grows
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
203 // downwards. Square brackets denote regions possibly larger than
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
204 // single 64 bit slots.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
205 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
206 // STACK (no JNI, no compiled code, no library calls,
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
207 // interpreter-loop is active):
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
208 // 0 [InterpretMethod]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
209 // [TOP_IJAVA_FRAME]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
210 // [PARENT_IJAVA_FRAME]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
211 // ...
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
212 // [PARENT_IJAVA_FRAME]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
213 // [ENTRY_FRAME]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
214 // [C_FRAME]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
215 // ...
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
216 // [C_FRAME]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
217 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
218 // TOP_IJAVA_FRAME:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
219 // 0 [TOP_IJAVA_FRAME_ABI]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
220 // alignment (optional)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
221 // [operand stack]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
222 // [monitors] (optional)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
223 // [cInterpreter object]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
224 // result, locals, and arguments are in parent frame!
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
225 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
226 // PARENT_IJAVA_FRAME:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
227 // 0 [PARENT_IJAVA_FRAME_ABI]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
228 // alignment (optional)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
229 // [callee's Java result]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
230 // [callee's locals w/o arguments]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
231 // [outgoing arguments]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
232 // [used part of operand stack w/o arguments]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
233 // [monitors] (optional)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
234 // [cInterpreter object]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
235 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
236 // ENTRY_FRAME:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
237 // 0 [PARENT_IJAVA_FRAME_ABI]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
238 // alignment (optional)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
239 // [callee's Java result]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
240 // [callee's locals w/o arguments]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
241 // [outgoing arguments]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
242 // [ENTRY_FRAME_LOCALS]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
243 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
244 // PARENT_IJAVA_FRAME_ABI:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
245 // 0 [ABI_48]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
246 // top_frame_sp
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
247 // initial_caller_sp
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
248 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
249 // TOP_IJAVA_FRAME_ABI:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
250 // 0 [PARENT_IJAVA_FRAME_ABI]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
251 // carg_3_unused
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
252 // carg_4_unused
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
253 // carg_5_unused
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
254 // carg_6_unused
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
255 // carg_7_unused
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
256 // frame_manager_lr
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
257 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
258
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
259 // PARENT_IJAVA_FRAME_ABI
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
260
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
261 struct parent_ijava_frame_abi : abi_48 {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
262 // SOE registers.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
263 // C2i adapters spill their top-frame stack-pointer here.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
264 uint64_t top_frame_sp; // carg_1
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
265 // Sp of calling compiled frame before it was resized by the c2i
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
266 // adapter or sp of call stub. Does not contain a valid value for
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
267 // non-initial frames.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
268 uint64_t initial_caller_sp; // carg_2
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
269 // aligned to frame::alignment_in_bytes (16)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
270 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
271
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
272 enum {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
273 parent_ijava_frame_abi_size = sizeof(parent_ijava_frame_abi)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
274 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
275
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
276 #define _parent_ijava_frame_abi(_component) \
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
277 (offset_of(frame::parent_ijava_frame_abi, _component))
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
278
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
279 // TOP_IJAVA_FRAME_ABI
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
280
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
281 struct top_ijava_frame_abi : parent_ijava_frame_abi {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
282 uint64_t carg_3_unused; // carg_3
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
283 uint64_t card_4_unused; //_16 carg_4
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
284 uint64_t carg_5_unused; // carg_5
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
285 uint64_t carg_6_unused; //_16 carg_6
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
286 uint64_t carg_7_unused; // carg_7
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
287 // Use arg8 for storing frame_manager_lr. The size of
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
288 // top_ijava_frame_abi must match abi_112.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
289 uint64_t frame_manager_lr; //_16 carg_8
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
290 // nothing to add here!
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
291 // aligned to frame::alignment_in_bytes (16)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
292 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
293
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
294 enum {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
295 top_ijava_frame_abi_size = sizeof(top_ijava_frame_abi)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
296 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
297
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
298 #define _top_ijava_frame_abi(_component) \
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
299 (offset_of(frame::top_ijava_frame_abi, _component))
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
300
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
301 // ENTRY_FRAME
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
302
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
303 struct entry_frame_locals {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
304 uint64_t call_wrapper_address;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
305 uint64_t result_address; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
306 uint64_t result_type;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
307 uint64_t arguments_tos_address; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
308 // aligned to frame::alignment_in_bytes (16)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
309 uint64_t r[spill_nonvolatiles_size/sizeof(uint64_t)];
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
310 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
311
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
312 enum {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
313 entry_frame_locals_size = sizeof(entry_frame_locals)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
314 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
315
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
316 #define _entry_frame_locals_neg(_component) \
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
317 (int)(-frame::entry_frame_locals_size + offset_of(frame::entry_frame_locals, _component))
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
318
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
319
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
320 // Frame layout for JIT generated methods
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
321 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
322 // In these figures the stack grows upwards, while memory grows
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
323 // downwards. Square brackets denote regions possibly larger than single
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
324 // 64 bit slots.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
325 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
326 // STACK (interpreted Java calls JIT generated Java):
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
327 // [JIT_FRAME] <-- SP (mod 16 = 0)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
328 // [TOP_IJAVA_FRAME]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
329 // ...
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
330 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
331 // JIT_FRAME (is a C frame according to PPC-64 ABI):
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
332 // [out_preserve]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
333 // [out_args]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
334 // [spills]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
335 // [pad_1]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
336 // [monitor] (optional)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
337 // ...
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
338 // [monitor] (optional)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
339 // [pad_2]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
340 // [in_preserve] added / removed by prolog / epilog
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
341 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
342
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
343 // JIT_ABI (TOP and PARENT)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
344
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
345 struct jit_abi {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
346 uint64_t callers_sp;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
347 uint64_t cr;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
348 uint64_t lr;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
349 uint64_t toc;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
350 // Nothing to add here!
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
351 // NOT ALIGNED to frame::alignment_in_bytes (16).
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
352 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
353
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
354 struct jit_out_preserve : jit_abi {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
355 // Nothing to add here!
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
356 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
357
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
358 struct jit_in_preserve {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
359 // Nothing to add here!
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
360 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
361
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
362 enum {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
363 jit_out_preserve_size = sizeof(jit_out_preserve),
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
364 jit_in_preserve_size = sizeof(jit_in_preserve)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
365 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
366
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
367 struct jit_monitor {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
368 uint64_t monitor[1];
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
369 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
370
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
371 enum {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
372 jit_monitor_size = sizeof(jit_monitor),
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
373 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
374
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
375 private:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
376
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
377 // STACK:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
378 // ...
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
379 // [THIS_FRAME] <-- this._sp (stack pointer for this frame)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
380 // [CALLER_FRAME] <-- this.fp() (_sp of caller's frame)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
381 // ...
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
382 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
383
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
384 // frame pointer for this frame
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
385 intptr_t* _fp;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
386
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
387 // The frame's stack pointer before it has been extended by a c2i adapter;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
388 // needed by deoptimization
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
389 intptr_t* _unextended_sp;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
390 void adjust_unextended_sp();
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
391
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
392 public:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
393
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
394 // Accessors for fields
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
395 intptr_t* fp() const { return _fp; }
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
396
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
397 // Accessors for ABIs
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
398 inline abi_48* own_abi() const { return (abi_48*) _sp; }
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
399 inline abi_48* callers_abi() const { return (abi_48*) _fp; }
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
400
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
401 private:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
402
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
403 // Find codeblob and set deopt_state.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
404 inline void find_codeblob_and_set_pc_and_deopt_state(address pc);
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
405
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
406 public:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
407
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
408 // Constructors
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
409 inline frame(intptr_t* sp);
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
410 frame(intptr_t* sp, address pc);
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
411 inline frame(intptr_t* sp, address pc, intptr_t* unextended_sp);
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
412
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
413 private:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
414
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
415 intptr_t* compiled_sender_sp(CodeBlob* cb) const;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
416 address* compiled_sender_pc_addr(CodeBlob* cb) const;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
417 address* sender_pc_addr(void) const;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
418
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
419 public:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
420
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
421 #ifdef CC_INTERP
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
422 // Additional interface for interpreter frames:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
423 inline interpreterState get_interpreterState() const;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
424 #endif
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
425
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
426 // Size of a monitor in bytes.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
427 static int interpreter_frame_monitor_size_in_bytes();
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
428
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
429 // The size of a cInterpreter object.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
430 static inline int interpreter_frame_cinterpreterstate_size_in_bytes();
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
431
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
432 private:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
433
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
434 // PPC port: permgen stuff
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
435 ConstantPoolCache** interpreter_frame_cpoolcache_addr() const;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
436
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
437 public:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
438
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
439 // Additional interface for entry frames:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
440 inline entry_frame_locals* get_entry_frame_locals() const {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
441 return (entry_frame_locals*) (((address) fp()) - entry_frame_locals_size);
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
442 }
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
443
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
444 enum {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
445 // normal return address is 1 bundle past PC
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
446 pc_return_offset = 0
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
447 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
448
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
449 #endif // CPU_PPC_VM_FRAME_PPC_HPP