annotate src/cpu/ppc/vm/frame_ppc.hpp @ 17804:fd1b9f02cc91

8036976: PPC64: implement the template interpreter Reviewed-by: kvn, coleenp Contributed-by: axel.siebenborn@sap.com, martin.doerr@sap.com
author goetz
date Mon, 10 Mar 2014 12:58:02 +0100
parents 31e80afe3fed
children 92aa6797d639
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.
17804
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
3 * Copyright 2012, 2014 SAP AG. All rights reserved.
14408
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 // C frame layout on PPC-64.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
33 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
34 // 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
35 // 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
36 // IBM Corp. (2003-10-29)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
37 // (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
38 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
39 // Square brackets denote stack regions possibly larger
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
40 // than a single 64 bit slot.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
41 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
42 // STACK:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
43 // 0 [C_FRAME] <-- SP after prolog (mod 16 = 0)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
44 // [C_FRAME] <-- SP before prolog
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 // [C_FRAME]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
47 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
48 // C_FRAME:
17803
31e80afe3fed 8035647: PPC64: Support for elf v2 abi.
goetz
parents: 14445
diff changeset
49 // 0 [ABI_REG_ARGS]
14408
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
50 // 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
51 // ...
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
52 // 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
53 // local 1
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
54 // ...
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
55 // local N
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
56 // spill slot for vector reg (16 bytes aligned)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
57 // ...
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
58 // spill slot for vector reg
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
59 // alignment (4 or 12 bytes)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
60 // V SR_VRSAVE
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
61 // V+4 spill slot for GR
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
62 // ... ...
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
63 // spill slot for GR
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
64 // spill slot for FR
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
65 // ...
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
66 // spill slot for FR
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
67 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
68 // ABI_48:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
69 // 0 caller's SP
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
70 // 8 space for condition register (CR) for next call
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
71 // 16 space for link register (LR) for next call
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
72 // 24 reserved
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
73 // 32 reserved
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
74 // 40 space for TOC (=R2) register for next call
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
75 //
17803
31e80afe3fed 8035647: PPC64: Support for elf v2 abi.
goetz
parents: 14445
diff changeset
76 // ABI_REG_ARGS:
14408
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
77 // 0 [ABI_48]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
78 // 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
79 // ... ...
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
80 // 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
81 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
82
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
83 public:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
84
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
85 // C frame layout
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 enum {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
88 // stack alignment
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
89 alignment_in_bytes = 16,
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
90 // log_2(16*8 bits) = 7.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
91 log_2_of_alignment_in_bits = 7
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
92 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
93
17803
31e80afe3fed 8035647: PPC64: Support for elf v2 abi.
goetz
parents: 14445
diff changeset
94 // ABI_MINFRAME:
31e80afe3fed 8035647: PPC64: Support for elf v2 abi.
goetz
parents: 14445
diff changeset
95 struct abi_minframe {
14408
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
96 uint64_t callers_sp;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
97 uint64_t cr; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
98 uint64_t lr;
17803
31e80afe3fed 8035647: PPC64: Support for elf v2 abi.
goetz
parents: 14445
diff changeset
99 #if !defined(ABI_ELFv2)
14408
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
100 uint64_t reserved1; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
101 uint64_t reserved2;
17803
31e80afe3fed 8035647: PPC64: Support for elf v2 abi.
goetz
parents: 14445
diff changeset
102 #endif
14408
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
103 uint64_t toc; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
104 // nothing to add here!
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
105 // aligned to frame::alignment_in_bytes (16)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
106 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
107
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
108 enum {
17803
31e80afe3fed 8035647: PPC64: Support for elf v2 abi.
goetz
parents: 14445
diff changeset
109 abi_minframe_size = sizeof(abi_minframe)
14408
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
110 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
111
17803
31e80afe3fed 8035647: PPC64: Support for elf v2 abi.
goetz
parents: 14445
diff changeset
112 struct abi_reg_args : abi_minframe {
14408
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
113 uint64_t carg_1;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
114 uint64_t carg_2; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
115 uint64_t carg_3;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
116 uint64_t carg_4; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
117 uint64_t carg_5;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
118 uint64_t carg_6; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
119 uint64_t carg_7;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
120 uint64_t carg_8; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
121 // aligned to frame::alignment_in_bytes (16)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
122 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
123
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
124 enum {
17803
31e80afe3fed 8035647: PPC64: Support for elf v2 abi.
goetz
parents: 14445
diff changeset
125 abi_reg_args_size = sizeof(abi_reg_args)
14408
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
126 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
127
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
128 #define _abi(_component) \
17803
31e80afe3fed 8035647: PPC64: Support for elf v2 abi.
goetz
parents: 14445
diff changeset
129 (offset_of(frame::abi_reg_args, _component))
14408
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
130
17803
31e80afe3fed 8035647: PPC64: Support for elf v2 abi.
goetz
parents: 14445
diff changeset
131 struct abi_reg_args_spill : abi_reg_args {
14408
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
132 // additional spill slots
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
133 uint64_t spill_ret;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
134 uint64_t spill_fret; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
135 // aligned to frame::alignment_in_bytes (16)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
136 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
137
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
138 enum {
17803
31e80afe3fed 8035647: PPC64: Support for elf v2 abi.
goetz
parents: 14445
diff changeset
139 abi_reg_args_spill_size = sizeof(abi_reg_args_spill)
14408
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
140 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
141
17803
31e80afe3fed 8035647: PPC64: Support for elf v2 abi.
goetz
parents: 14445
diff changeset
142 #define _abi_reg_args_spill(_component) \
31e80afe3fed 8035647: PPC64: Support for elf v2 abi.
goetz
parents: 14445
diff changeset
143 (offset_of(frame::abi_reg_args_spill, _component))
14408
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
144
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
145 // non-volatile GPRs:
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 struct spill_nonvolatiles {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
148 uint64_t r14;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
149 uint64_t r15; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
150 uint64_t r16;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
151 uint64_t r17; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
152 uint64_t r18;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
153 uint64_t r19; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
154 uint64_t r20;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
155 uint64_t r21; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
156 uint64_t r22;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
157 uint64_t r23; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
158 uint64_t r24;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
159 uint64_t r25; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
160 uint64_t r26;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
161 uint64_t r27; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
162 uint64_t r28;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
163 uint64_t r29; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
164 uint64_t r30;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
165 uint64_t r31; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
166
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
167 double f14;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
168 double f15;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
169 double f16;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
170 double f17;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
171 double f18;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
172 double f19;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
173 double f20;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
174 double f21;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
175 double f22;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
176 double f23;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
177 double f24;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
178 double f25;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
179 double f26;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
180 double f27;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
181 double f28;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
182 double f29;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
183 double f30;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
184 double f31;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
185
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
186 // aligned to frame::alignment_in_bytes (16)
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
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
189 enum {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
190 spill_nonvolatiles_size = sizeof(spill_nonvolatiles)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
191 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
192
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
193 #define _spill_nonvolatiles_neg(_component) \
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
194 (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
195
17804
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
196
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
197
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
198 #ifndef CC_INTERP
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
199 // Frame layout for the Java template interpreter on PPC64.
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
200 //
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
201 // Diffs to the CC_INTERP are marked with 'X'.
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
202 //
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
203 // TOP_IJAVA_FRAME:
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
204 //
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
205 // 0 [TOP_IJAVA_FRAME_ABI]
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
206 // alignment (optional)
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
207 // [operand stack]
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
208 // [monitors] (optional)
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
209 // X[IJAVA_STATE]
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
210 // note: own locals are located in the caller frame.
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
211 //
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
212 // PARENT_IJAVA_FRAME:
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
213 //
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
214 // 0 [PARENT_IJAVA_FRAME_ABI]
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
215 // alignment (optional)
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
216 // [callee's Java result]
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
217 // [callee's locals w/o arguments]
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
218 // [outgoing arguments]
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
219 // [used part of operand stack w/o arguments]
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
220 // [monitors] (optional)
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
221 // X[IJAVA_STATE]
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
222 //
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
223
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
224 struct parent_ijava_frame_abi : abi_minframe {
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
225 };
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
226
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
227 enum {
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
228 parent_ijava_frame_abi_size = sizeof(parent_ijava_frame_abi)
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
229 };
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
230
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
231 #define _parent_ijava_frame_abi(_component) \
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
232 (offset_of(frame::parent_ijava_frame_abi, _component))
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
233
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
234 struct top_ijava_frame_abi : abi_reg_args {
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
235 };
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
236
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
237 enum {
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
238 top_ijava_frame_abi_size = sizeof(top_ijava_frame_abi)
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
239 };
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
240
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
241 #define _top_ijava_frame_abi(_component) \
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
242 (offset_of(frame::top_ijava_frame_abi, _component))
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
243
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
244 struct ijava_state {
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
245 #ifdef ASSERT
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
246 uint64_t ijava_reserved; // Used for assertion.
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
247 uint64_t ijava_reserved2; // Inserted for alignment.
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
248 #endif
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
249 uint64_t method;
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
250 uint64_t locals;
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
251 uint64_t monitors;
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
252 uint64_t cpoolCache;
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
253 uint64_t bcp;
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
254 uint64_t esp;
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
255 uint64_t mdx;
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
256 uint64_t top_frame_sp; // Maybe define parent_frame_abi and move there.
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
257 uint64_t sender_sp;
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
258 // Slots only needed for native calls. Maybe better to move elsewhere.
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
259 uint64_t oop_tmp;
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
260 uint64_t lresult;
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
261 uint64_t fresult;
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
262 // Aligned to frame::alignment_in_bytes (16).
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
263 };
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
264
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
265 enum {
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
266 ijava_state_size = sizeof(ijava_state)
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
267 };
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
268
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
269 #define _ijava_state_neg(_component) \
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
270 (int) (-frame::ijava_state_size + offset_of(frame::ijava_state, _component))
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
271
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
272 #else // CC_INTERP:
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
273
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
274 // Frame layout for the Java C++ interpreter on PPC64.
14408
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 // 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
277 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
278 // 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
279 // downwards. Square brackets denote regions possibly larger than
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
280 // single 64 bit slots.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
281 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
282 // STACK (no JNI, no compiled code, no library calls,
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
283 // interpreter-loop is active):
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
284 // 0 [InterpretMethod]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
285 // [TOP_IJAVA_FRAME]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
286 // [PARENT_IJAVA_FRAME]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
287 // ...
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
288 // [PARENT_IJAVA_FRAME]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
289 // [ENTRY_FRAME]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
290 // [C_FRAME]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
291 // ...
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
292 // [C_FRAME]
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 // TOP_IJAVA_FRAME:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
295 // 0 [TOP_IJAVA_FRAME_ABI]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
296 // alignment (optional)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
297 // [operand stack]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
298 // [monitors] (optional)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
299 // [cInterpreter object]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
300 // result, locals, and arguments are in parent frame!
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
301 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
302 // PARENT_IJAVA_FRAME:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
303 // 0 [PARENT_IJAVA_FRAME_ABI]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
304 // alignment (optional)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
305 // [callee's Java result]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
306 // [callee's locals w/o arguments]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
307 // [outgoing arguments]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
308 // [used part of operand stack w/o arguments]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
309 // [monitors] (optional)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
310 // [cInterpreter object]
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 // ENTRY_FRAME:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
313 // 0 [PARENT_IJAVA_FRAME_ABI]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
314 // alignment (optional)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
315 // [callee's Java result]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
316 // [callee's locals w/o arguments]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
317 // [outgoing arguments]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
318 // [ENTRY_FRAME_LOCALS]
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 // PARENT_IJAVA_FRAME_ABI:
17803
31e80afe3fed 8035647: PPC64: Support for elf v2 abi.
goetz
parents: 14445
diff changeset
321 // 0 [ABI_MINFRAME]
14408
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
322 // top_frame_sp
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
323 // initial_caller_sp
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
324 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
325 // TOP_IJAVA_FRAME_ABI:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
326 // 0 [PARENT_IJAVA_FRAME_ABI]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
327 // carg_3_unused
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
328 // carg_4_unused
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
329 // carg_5_unused
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
330 // carg_6_unused
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
331 // carg_7_unused
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
332 // frame_manager_lr
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
333 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
334
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
335 // PARENT_IJAVA_FRAME_ABI
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
336
17803
31e80afe3fed 8035647: PPC64: Support for elf v2 abi.
goetz
parents: 14445
diff changeset
337 struct parent_ijava_frame_abi : abi_minframe {
14408
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
338 // SOE registers.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
339 // C2i adapters spill their top-frame stack-pointer here.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
340 uint64_t top_frame_sp; // carg_1
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
341 // 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
342 // 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
343 // non-initial frames.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
344 uint64_t initial_caller_sp; // carg_2
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
345 // aligned to frame::alignment_in_bytes (16)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
346 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
347
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
348 enum {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
349 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
350 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
351
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
352 #define _parent_ijava_frame_abi(_component) \
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
353 (offset_of(frame::parent_ijava_frame_abi, _component))
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
354
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
355 // TOP_IJAVA_FRAME_ABI
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 struct top_ijava_frame_abi : parent_ijava_frame_abi {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
358 uint64_t carg_3_unused; // carg_3
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
359 uint64_t card_4_unused; //_16 carg_4
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
360 uint64_t carg_5_unused; // carg_5
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
361 uint64_t carg_6_unused; //_16 carg_6
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
362 uint64_t carg_7_unused; // carg_7
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
363 // Use arg8 for storing frame_manager_lr. The size of
17803
31e80afe3fed 8035647: PPC64: Support for elf v2 abi.
goetz
parents: 14445
diff changeset
364 // top_ijava_frame_abi must match abi_reg_args.
14408
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
365 uint64_t frame_manager_lr; //_16 carg_8
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
366 // nothing to add here!
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
367 // aligned to frame::alignment_in_bytes (16)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
368 };
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 enum {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
371 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
372 };
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 #define _top_ijava_frame_abi(_component) \
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
375 (offset_of(frame::top_ijava_frame_abi, _component))
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
376
17804
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
377 #endif // CC_INTERP
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
378
14408
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
379 // ENTRY_FRAME
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
380
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
381 struct entry_frame_locals {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
382 uint64_t call_wrapper_address;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
383 uint64_t result_address; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
384 uint64_t result_type;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
385 uint64_t arguments_tos_address; //_16
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
386 // aligned to frame::alignment_in_bytes (16)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
387 uint64_t r[spill_nonvolatiles_size/sizeof(uint64_t)];
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
388 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
389
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
390 enum {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
391 entry_frame_locals_size = sizeof(entry_frame_locals)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
392 };
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 #define _entry_frame_locals_neg(_component) \
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
395 (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
396
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
397
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
398 // Frame layout for JIT generated methods
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
399 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
400 // 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
401 // downwards. Square brackets denote regions possibly larger than single
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
402 // 64 bit slots.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
403 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
404 // STACK (interpreted Java calls JIT generated Java):
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
405 // [JIT_FRAME] <-- SP (mod 16 = 0)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
406 // [TOP_IJAVA_FRAME]
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 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
409 // 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
410 // [out_preserve]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
411 // [out_args]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
412 // [spills]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
413 // [pad_1]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
414 // [monitor] (optional)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
415 // ...
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
416 // [monitor] (optional)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
417 // [pad_2]
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
418 // [in_preserve] added / removed by prolog / epilog
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
419 //
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 // JIT_ABI (TOP and PARENT)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
422
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
423 struct jit_abi {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
424 uint64_t callers_sp;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
425 uint64_t cr;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
426 uint64_t lr;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
427 uint64_t toc;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
428 // Nothing to add here!
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
429 // NOT ALIGNED to frame::alignment_in_bytes (16).
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
430 };
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 struct jit_out_preserve : jit_abi {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
433 // Nothing to add here!
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
434 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
435
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
436 struct jit_in_preserve {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
437 // Nothing to add here!
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
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
440 enum {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
441 jit_out_preserve_size = sizeof(jit_out_preserve),
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
442 jit_in_preserve_size = sizeof(jit_in_preserve)
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
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
445 struct jit_monitor {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
446 uint64_t monitor[1];
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 enum {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
450 jit_monitor_size = sizeof(jit_monitor),
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
451 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
452
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
453 private:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
454
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
455 // STACK:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
456 // ...
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
457 // [THIS_FRAME] <-- this._sp (stack pointer for this frame)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
458 // [CALLER_FRAME] <-- this.fp() (_sp of caller's frame)
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
459 // ...
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
460 //
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
461
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
462 // frame pointer for this frame
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
463 intptr_t* _fp;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
464
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
465 // 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
466 // needed by deoptimization
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
467 intptr_t* _unextended_sp;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
468 void adjust_unextended_sp();
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
469
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
470 public:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
471
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
472 // Accessors for fields
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
473 intptr_t* fp() const { return _fp; }
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
474
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
475 // Accessors for ABIs
17803
31e80afe3fed 8035647: PPC64: Support for elf v2 abi.
goetz
parents: 14445
diff changeset
476 inline abi_minframe* own_abi() const { return (abi_minframe*) _sp; }
31e80afe3fed 8035647: PPC64: Support for elf v2 abi.
goetz
parents: 14445
diff changeset
477 inline abi_minframe* callers_abi() const { return (abi_minframe*) _fp; }
14408
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
478
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
479 private:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
480
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
481 // Find codeblob and set deopt_state.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
482 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
483
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
484 public:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
485
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
486 // Constructors
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
487 inline frame(intptr_t* sp);
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
488 frame(intptr_t* sp, address pc);
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
489 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
490
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
491 private:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
492
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
493 intptr_t* compiled_sender_sp(CodeBlob* cb) const;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
494 address* compiled_sender_pc_addr(CodeBlob* cb) const;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
495 address* sender_pc_addr(void) const;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
496
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
497 public:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
498
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
499 #ifdef CC_INTERP
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
500 // Additional interface for interpreter frames:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
501 inline interpreterState get_interpreterState() const;
17804
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
502 #else
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
503 inline ijava_state* get_ijava_state() const;
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
504 // Some convenient register frame setters/getters for deoptimization.
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
505 inline intptr_t* interpreter_frame_esp() const;
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
506 inline void interpreter_frame_set_cpcache(ConstantPoolCache* cp);
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
507 inline void interpreter_frame_set_esp(intptr_t* esp);
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
508 inline void interpreter_frame_set_top_frame_sp(intptr_t* top_frame_sp);
fd1b9f02cc91 8036976: PPC64: implement the template interpreter
goetz
parents: 17803
diff changeset
509 inline void interpreter_frame_set_sender_sp(intptr_t* sender_sp);
14445
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents: 14408
diff changeset
510 #endif // CC_INTERP
14408
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
511
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
512 // Size of a monitor in bytes.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
513 static int interpreter_frame_monitor_size_in_bytes();
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
514
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
515 // The size of a cInterpreter object.
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
516 static inline int interpreter_frame_cinterpreterstate_size_in_bytes();
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
517
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
518 private:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
519
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
520 ConstantPoolCache** interpreter_frame_cpoolcache_addr() const;
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
521
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
522 public:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
523
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
524 // Additional interface for entry frames:
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
525 inline entry_frame_locals* get_entry_frame_locals() const {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
526 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
527 }
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
528
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
529 enum {
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
530 // normal return address is 1 bundle past PC
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
531 pc_return_offset = 0
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
532 };
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
533
ec28f9c041ff 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
534 #endif // CPU_PPC_VM_FRAME_PPC_HPP