Mercurial > hg > graal-compiler
annotate src/cpu/sparc/vm/compiledIC_sparc.cpp @ 21559:be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 28 May 2015 15:36:48 +0200 |
parents | 7848fc12602b |
children | c28cb37b2e1d |
rev | line source |
---|---|
10168
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
1 /* |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
4 * |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
8 * |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
13 * accompanied this code). |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
14 * |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
18 * |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
21 * questions. |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
22 * |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
23 */ |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
24 |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
25 #include "precompiled.hpp" |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
26 #include "asm/macroAssembler.inline.hpp" |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
27 #include "code/compiledIC.hpp" |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
28 #include "code/icBuffer.hpp" |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
29 #include "code/nmethod.hpp" |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
30 #include "memory/resourceArea.hpp" |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
31 #include "runtime/mutexLocker.hpp" |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
32 #include "runtime/safepoint.hpp" |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
33 #ifdef COMPILER2 |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
34 #include "opto/matcher.hpp" |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
35 #endif |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
36 |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
37 // Release the CompiledICHolder* associated with this call site is there is one. |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
38 void CompiledIC::cleanup_call_site(virtual_call_Relocation* call_site) { |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
39 // This call site might have become stale so inspect it carefully. |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
40 NativeCall* call = nativeCall_at(call_site->addr()); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
41 if (is_icholder_entry(call->destination())) { |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
42 NativeMovConstReg* value = nativeMovConstReg_at(call_site->cached_value()); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
43 InlineCacheBuffer::queue_for_release((CompiledICHolder*)value->data()); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
44 } |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
45 } |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
46 |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
47 bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site) { |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
48 // This call site might have become stale so inspect it carefully. |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
49 NativeCall* call = nativeCall_at(call_site->addr()); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
50 return is_icholder_entry(call->destination()); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
51 } |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
52 |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
53 // ---------------------------------------------------------------------------- |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
54 |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
55 #define __ _masm. |
15046
5c71dcf0915d
use hotspot static stubs for call sites
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
10409
diff
changeset
|
56 void CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf, address mark) { |
10168
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
57 // Stub is fixed up when the corresponding call is converted from calling |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
58 // compiled code to calling interpreted code. |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
59 // set (empty), G5 |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
60 // jmp -1 |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
61 |
15046
5c71dcf0915d
use hotspot static stubs for call sites
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
10409
diff
changeset
|
62 if (mark == NULL) { |
5c71dcf0915d
use hotspot static stubs for call sites
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
10409
diff
changeset
|
63 mark = cbuf.insts_mark(); // Get mark within main instrs section. |
5c71dcf0915d
use hotspot static stubs for call sites
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
10409
diff
changeset
|
64 } |
10168
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
65 |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
66 MacroAssembler _masm(&cbuf); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
67 |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
68 address base = |
15046
5c71dcf0915d
use hotspot static stubs for call sites
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
10409
diff
changeset
|
69 __ start_a_stub(to_interp_stub_size()); |
5c71dcf0915d
use hotspot static stubs for call sites
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
10409
diff
changeset
|
70 guarantee(base != NULL, "out of space"); |
10168
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
71 |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
72 // Static stub relocation stores the instruction address of the call. |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
73 __ relocate(static_stub_Relocation::spec(mark)); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
74 |
15046
5c71dcf0915d
use hotspot static stubs for call sites
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
10409
diff
changeset
|
75 __ set_metadata(NULL, G5); |
10168
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
76 |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
77 __ set_inst_mark(); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
78 AddressLiteral addrlit(-1); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
79 __ JUMP(addrlit, G3, 0); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
80 |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
81 __ delayed()->nop(); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
82 |
15046
5c71dcf0915d
use hotspot static stubs for call sites
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
10409
diff
changeset
|
83 assert(__ pc() - base <= to_interp_stub_size(), "wrong stub size"); |
5c71dcf0915d
use hotspot static stubs for call sites
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
10409
diff
changeset
|
84 |
10168
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
85 // Update current stubs pointer and restore code_end. |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
86 __ end_a_stub(); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
87 } |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
88 #undef __ |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
89 |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
90 int CompiledStaticCall::to_interp_stub_size() { |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
91 // This doesn't need to be accurate but it must be larger or equal to |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
92 // the real size of the stub. |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
93 return (NativeMovConstReg::instruction_size + // sethi/setlo; |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
94 NativeJump::instruction_size + // sethi; jmp; nop |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
95 (TraceJumps ? 20 * BytesPerInstWord : 0) ); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
96 } |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
97 |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
98 // Relocation entries for call stub, compiled java to interpreter. |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
99 int CompiledStaticCall::reloc_to_interp_stub() { |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
100 return 10; // 4 in emit_java_to_interp + 1 in Java_Static_Call |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
101 } |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
102 |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
103 void CompiledStaticCall::set_to_interpreted(methodHandle callee, address entry) { |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
104 address stub = find_stub(); |
21559
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
20804
diff
changeset
|
105 #ifdef JVMCI |
10409 | 106 if (stub == NULL) { |
107 set_destination_mt_safe(entry); | |
108 return; | |
109 } | |
110 #endif | |
10168
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
111 guarantee(stub != NULL, "stub not found"); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
112 |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
113 if (TraceICs) { |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
114 ResourceMark rm; |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
115 tty->print_cr("CompiledStaticCall@" INTPTR_FORMAT ": set_to_interpreted %s", |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
116 instruction_address(), |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
117 callee->name_and_sig_as_C_string()); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
118 } |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
119 |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
120 // Creation also verifies the object. |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
121 NativeMovConstReg* method_holder = nativeMovConstReg_at(stub); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
122 NativeJump* jump = nativeJump_at(method_holder->next_instruction_address()); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
123 |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
124 assert(method_holder->data() == 0 || method_holder->data() == (intptr_t)callee(), |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
125 "a) MT-unsafe modification of inline cache"); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
126 assert(jump->jump_destination() == (address)-1 || jump->jump_destination() == entry, |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
127 "b) MT-unsafe modification of inline cache"); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
128 |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
129 // Update stub. |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
130 method_holder->set_data((intptr_t)callee()); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
131 jump->set_jump_destination(entry); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
132 |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
133 // Update jump to call. |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
134 set_destination_mt_safe(stub); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
135 } |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
136 |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
137 void CompiledStaticCall::set_stub_to_clean(static_stub_Relocation* static_stub) { |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
138 assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "mt unsafe call"); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
139 // Reset stub. |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
140 address stub = static_stub->addr(); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
141 assert(stub != NULL, "stub not found"); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
142 // Creation also verifies the object. |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
143 NativeMovConstReg* method_holder = nativeMovConstReg_at(stub); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
144 NativeJump* jump = nativeJump_at(method_holder->next_instruction_address()); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
145 method_holder->set_data(0); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
146 jump->set_jump_destination((address)-1); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
147 } |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
148 |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
149 //----------------------------------------------------------------------------- |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
150 // Non-product mode code |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
151 #ifndef PRODUCT |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
152 |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
153 void CompiledStaticCall::verify() { |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
154 // Verify call. |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
155 NativeCall::verify(); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
156 if (os::is_MP()) { |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
157 verify_alignment(); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
158 } |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
159 |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
160 // Verify stub. |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
161 address stub = find_stub(); |
21559
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
20804
diff
changeset
|
162 #ifndef JVMCI |
10168
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
163 assert(stub != NULL, "no stub found for static call"); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
164 // Creation also verifies the object. |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
165 NativeMovConstReg* method_holder = nativeMovConstReg_at(stub); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
166 NativeJump* jump = nativeJump_at(method_holder->next_instruction_address()); |
10409 | 167 #endif |
10168
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
168 |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
169 // Verify state. |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
170 assert(is_clean() || is_call_to_compiled() || is_call_to_interpreted(), "sanity check"); |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
171 } |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
172 |
a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
dlong
parents:
diff
changeset
|
173 #endif // !PRODUCT |