annotate src/cpu/sparc/vm/graalCodeInstaller_sparc.hpp @ 11760:ce0b00597980

made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
author Doug Simon <doug.simon@oracle.com>
date Tue, 24 Sep 2013 08:51:02 +0200
parents 5a9d68c3a7d7
children 4c96ccce3772
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9934
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
1 /*
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
4 *
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
8 *
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
13 * accompanied this code).
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
14 *
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
18 *
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
21 * questions.
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
22 */
10684
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
23
9934
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
24 #ifndef CPU_SPARC_VM_CODEINSTALLER_SPARC_HPP
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
25 #define CPU_SPARC_VM_CODEINSTALLER_SPARC_HPP
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
26
10684
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
27 #include "graal/graalCompiler.hpp"
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
28 #include "graal/graalCompilerToVM.hpp"
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
29 #include "graal/graalJavaAccess.hpp"
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
30
9934
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
31 inline jint CodeInstaller::pd_next_offset(NativeInstruction* inst, jint pc_offset, oop method) {
10854
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10792
diff changeset
32 if (inst->is_call() || inst->is_jump()) {
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10792
diff changeset
33 return pc_offset + NativeCall::instruction_size;
11233
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
34 } else if (inst->is_call_reg()) {
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
35 return pc_offset + NativeCallReg::instruction_size;
10854
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10792
diff changeset
36 } else if (inst->is_sethi()) {
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10792
diff changeset
37 return pc_offset + NativeFarCall::instruction_size;
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10792
diff changeset
38 } else {
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10792
diff changeset
39 fatal("unsupported type of instruction for call site");
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10792
diff changeset
40 return 0;
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10792
diff changeset
41 }
9934
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
42 }
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
43
10684
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
44 inline void CodeInstaller::pd_site_DataPatch(int pc_offset, oop site) {
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
45 oop constant = CompilationResult_DataPatch::constant(site);
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
46 int alignment = CompilationResult_DataPatch::alignment(site);
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
47 bool inlined = CompilationResult_DataPatch::inlined(site) == JNI_TRUE;
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
48
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
49 oop kind = Constant::kind(constant);
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
50 char typeChar = Kind::typeChar(kind);
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
51
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
52 address pc = _instructions->start() + pc_offset;
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
53
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
54 switch (typeChar) {
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
55 case 'z':
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
56 case 'b':
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
57 case 's':
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
58 case 'c':
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
59 case 'i':
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
60 fatal("int-sized values not expected in DataPatch");
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
61 break;
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
62 case 'f':
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
63 case 'j':
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
64 case 'd': {
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
65 if (inlined) {
10792
7a8d6ba83a04 SPARC: fixes and more stuff works
twisti
parents: 10684
diff changeset
66 NativeMovConstReg* move = nativeMovConstReg_at(pc);
7a8d6ba83a04 SPARC: fixes and more stuff works
twisti
parents: 10684
diff changeset
67 uint64_t value = Constant::primitive(constant);
7a8d6ba83a04 SPARC: fixes and more stuff works
twisti
parents: 10684
diff changeset
68 move->set_data(value);
10684
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
69 } else {
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
70 int size = _constants->size();
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
71 if (alignment > 0) {
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
72 guarantee(alignment <= _constants->alignment(), "Alignment inside constants section is restricted by alignment of section begin");
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
73 size = align_size_up(size, alignment);
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
74 }
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
75 // we don't care if this is a long/double/etc., the primitive field contains the right bits
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
76 address dest = _constants->start() + size;
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
77 _constants->set_end(dest);
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
78 uint64_t value = Constant::primitive(constant);
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
79 _constants->emit_int64(value);
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
80
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
81 NativeMovRegMem* load = nativeMovRegMem_at(pc);
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
82 int disp = _constants_size + pc_offset - size - BytesPerInstWord;
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
83 load->set_offset(-disp);
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
84 }
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
85 break;
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
86 }
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
87 case 'a': {
11233
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
88 if (inlined) {
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
89 NativeMovConstReg* move = nativeMovConstReg_at(pc);
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
90 Handle obj = Constant::object(constant);
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
91 jobject value = JNIHandles::make_local(obj());
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
92 move->set_data((intptr_t) value);
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
93
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
94 // We need two relocations: one on the sethi and one on the add.
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
95 int oop_index = _oop_recorder->find_index(value);
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
96 RelocationHolder rspec = oop_Relocation::spec(oop_index);
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
97 _instructions->relocate(pc + NativeMovConstReg::sethi_offset, rspec);
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
98 _instructions->relocate(pc + NativeMovConstReg::add_offset, rspec);
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
99 } else {
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
100 int size = _constants->size();
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
101 if (alignment > 0) {
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
102 guarantee(alignment <= _constants->alignment(), "Alignment inside constants section is restricted by alignment of section begin");
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
103 size = align_size_up(size, alignment);
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
104 }
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
105 address dest = _constants->start() + size;
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
106 _constants->set_end(dest);
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
107 Handle obj = Constant::object(constant);
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
108 jobject value = JNIHandles::make_local(obj());
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
109 _constants->emit_address((address) value);
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
110
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
111 NativeMovRegMem* load = nativeMovRegMem_at(pc);
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
112 int disp = _constants_size + pc_offset - size - BytesPerInstWord;
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
113 load->set_offset(-disp);
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
114
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
115 int oop_index = _oop_recorder->find_index(value);
5a9d68c3a7d7 SPARC: a lot of fixes and more
twisti
parents: 10871
diff changeset
116 _constants->relocate(dest, oop_Relocation::spec(oop_index));
10792
7a8d6ba83a04 SPARC: fixes and more stuff works
twisti
parents: 10684
diff changeset
117 }
10684
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
118 break;
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
119 }
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
120 default:
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
121 fatal(err_msg("unexpected Kind (%d) in DataPatch", typeChar));
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
122 break;
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
123 }
9934
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
124 }
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
125
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
126 inline void CodeInstaller::pd_relocate_CodeBlob(CodeBlob* cb, NativeInstruction* inst) {
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
127 fatal("CodeInstaller::pd_relocate_CodeBlob - sparc unimp");
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
128 }
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
129
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
130 inline void CodeInstaller::pd_relocate_ForeignCall(NativeInstruction* inst, jlong foreign_call_destination) {
10854
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10792
diff changeset
131 address pc = (address) inst;
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10792
diff changeset
132 if (inst->is_call()) {
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10792
diff changeset
133 NativeCall* call = nativeCall_at(pc);
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10792
diff changeset
134 call->set_destination((address) foreign_call_destination);
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10792
diff changeset
135 _instructions->relocate(call->instruction_address(), runtime_call_Relocation::spec());
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10792
diff changeset
136 } else if (inst->is_sethi()) {
10871
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents: 10854
diff changeset
137 NativeJump* jump = nativeJump_at(pc);
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents: 10854
diff changeset
138 jump->set_jump_destination((address) foreign_call_destination);
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents: 10854
diff changeset
139 _instructions->relocate(jump->instruction_address(), runtime_call_Relocation::spec());
10854
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10792
diff changeset
140 } else {
10871
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents: 10854
diff changeset
141 fatal(err_msg("unknown call or jump instruction at %p", pc));
10854
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10792
diff changeset
142 }
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10792
diff changeset
143 TRACE_graal_3("relocating (foreign call) at %p", inst);
9934
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
144 }
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
145
10684
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
146 inline void CodeInstaller::pd_relocate_JavaMethod(oop hotspot_method, jint pc_offset) {
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
147 #ifdef ASSERT
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
148 Method* method = NULL;
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
149 // we need to check, this might also be an unresolved method
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
150 if (hotspot_method->is_a(HotSpotResolvedJavaMethod::klass())) {
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
151 method = getMethodFromHotSpotMethod(hotspot_method);
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
152 }
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
153 #endif
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
154 switch (_next_call_type) {
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
155 case MARK_INLINE_INVOKE:
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
156 break;
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
157 case MARK_INVOKEVIRTUAL:
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
158 case MARK_INVOKEINTERFACE: {
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
159 assert(method == NULL || !method->is_static(), "cannot call static method with invokeinterface");
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
160 NativeCall* call = nativeCall_at(_instructions->start() + pc_offset);
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
161 call->set_destination(SharedRuntime::get_resolve_virtual_call_stub());
10792
7a8d6ba83a04 SPARC: fixes and more stuff works
twisti
parents: 10684
diff changeset
162 _instructions->relocate(call->instruction_address(), virtual_call_Relocation::spec(_invoke_mark_pc));
10684
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
163 break;
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
164 }
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
165 case MARK_INVOKESTATIC: {
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
166 assert(method == NULL || method->is_static(), "cannot call non-static method with invokestatic");
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
167 NativeCall* call = nativeCall_at(_instructions->start() + pc_offset);
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
168 call->set_destination(SharedRuntime::get_resolve_static_call_stub());
10792
7a8d6ba83a04 SPARC: fixes and more stuff works
twisti
parents: 10684
diff changeset
169 _instructions->relocate(call->instruction_address(), relocInfo::static_call_type);
10684
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
170 break;
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
171 }
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
172 case MARK_INVOKESPECIAL: {
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
173 assert(method == NULL || !method->is_static(), "cannot call static method with invokespecial");
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
174 NativeCall* call = nativeCall_at(_instructions->start() + pc_offset);
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
175 call->set_destination(SharedRuntime::get_resolve_opt_virtual_call_stub());
10854
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10792
diff changeset
176 _instructions->relocate(call->instruction_address(), relocInfo::opt_virtual_call_type);
10684
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
177 break;
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
178 }
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
179 default:
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
180 fatal("invalid _next_call_type value");
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
181 break;
6ff467cdb105 Code installer changes for SPARC.
twisti
parents: 10411
diff changeset
182 }
9934
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
183 }
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
184
0f7ca53be929 CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff changeset
185 #endif // CPU_SPARC_VM_CODEINSTALLER_SPARC_HPP