Mercurial > hg > truffle
annotate src/cpu/sparc/vm/jvmciCodeInstaller_sparc.cpp @ 21803:30b03297ba94
change phase order (ConvertDeoptimizeToGuard earlier, PEA after loop peeling/unswitching)
author | Lukas Stadler <lukas.stadler@oracle.com> |
---|---|
date | Tue, 09 Jun 2015 11:06:32 +0200 |
parents | be896a1983c0 |
children |
rev | line source |
---|---|
9934
0f7ca53be929
CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff
changeset
|
1 /* |
21255
ccddbb1409d2
[SPARC] Implement Narrow OOPS
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
18262
diff
changeset
|
2 * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. |
9934
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 | 23 |
21559
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21255
diff
changeset
|
24 #include "jvmci/jvmciCodeInstaller.hpp" |
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21255
diff
changeset
|
25 #include "jvmci/jvmciRuntime.hpp" |
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21255
diff
changeset
|
26 #include "jvmci/jvmciCompilerToVM.hpp" |
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21255
diff
changeset
|
27 #include "jvmci/jvmciJavaAccess.hpp" |
17024
4e2d34d7715b
[SPARC/AMD64] Splitting up oopmap generation for Intel XMM and SPARC Floatingpoint registers
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
16631
diff
changeset
|
28 #include "vmreg_sparc.inline.hpp" |
10684 | 29 |
15123
7ccd2a1df0fa
made SPARC compile again; moved graalCodeInstaller_<arch>.hpp to .cpp files
twisti
parents:
14574
diff
changeset
|
30 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
|
31 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
|
32 return pc_offset + NativeCall::instruction_size; |
11233 | 33 } else if (inst->is_call_reg()) { |
34 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
|
35 } else if (inst->is_sethi()) { |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
10792
diff
changeset
|
36 return pc_offset + NativeFarCall::instruction_size; |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
10792
diff
changeset
|
37 } else { |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
10792
diff
changeset
|
38 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
|
39 return 0; |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
10792
diff
changeset
|
40 } |
9934
0f7ca53be929
CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff
changeset
|
41 } |
0f7ca53be929
CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff
changeset
|
42 |
18176
c2270ad35f57
Better construction of data section and data patches.
Roland Schatz <roland.schatz@oracle.com>
parents:
17024
diff
changeset
|
43 void CodeInstaller::pd_patch_OopConstant(int pc_offset, Handle& constant) { |
15123
7ccd2a1df0fa
made SPARC compile again; moved graalCodeInstaller_<arch>.hpp to .cpp files
twisti
parents:
14574
diff
changeset
|
44 address pc = _instructions->start() + pc_offset; |
18262
f7d45e2426d4
converted HotSpotObjectConstant to an interface
Doug Simon <doug.simon@oracle.com>
parents:
18222
diff
changeset
|
45 Handle obj = HotSpotObjectConstantImpl::object(constant); |
15123
7ccd2a1df0fa
made SPARC compile again; moved graalCodeInstaller_<arch>.hpp to .cpp files
twisti
parents:
14574
diff
changeset
|
46 jobject value = JNIHandles::make_local(obj()); |
18262
f7d45e2426d4
converted HotSpotObjectConstant to an interface
Doug Simon <doug.simon@oracle.com>
parents:
18222
diff
changeset
|
47 if (HotSpotObjectConstantImpl::compressed(constant)) { |
21255
ccddbb1409d2
[SPARC] Implement Narrow OOPS
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
18262
diff
changeset
|
48 #ifdef _LP64 |
ccddbb1409d2
[SPARC] Implement Narrow OOPS
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
18262
diff
changeset
|
49 int oop_index = _oop_recorder->find_index(value); |
ccddbb1409d2
[SPARC] Implement Narrow OOPS
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
18262
diff
changeset
|
50 RelocationHolder rspec = oop_Relocation::spec(oop_index); |
ccddbb1409d2
[SPARC] Implement Narrow OOPS
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
18262
diff
changeset
|
51 _instructions->relocate(pc, rspec, 1); |
ccddbb1409d2
[SPARC] Implement Narrow OOPS
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
18262
diff
changeset
|
52 #else |
ccddbb1409d2
[SPARC] Implement Narrow OOPS
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
18262
diff
changeset
|
53 fatal("compressed oop on 32bit"); |
ccddbb1409d2
[SPARC] Implement Narrow OOPS
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
18262
diff
changeset
|
54 #endif |
14561
e14198669e5c
Make data patch system use vm specific NarrowOop kind.
Roland Schatz <roland.schatz@oracle.com>
parents:
13576
diff
changeset
|
55 } else { |
e14198669e5c
Make data patch system use vm specific NarrowOop kind.
Roland Schatz <roland.schatz@oracle.com>
parents:
13576
diff
changeset
|
56 NativeMovConstReg* move = nativeMovConstReg_at(pc); |
e14198669e5c
Make data patch system use vm specific NarrowOop kind.
Roland Schatz <roland.schatz@oracle.com>
parents:
13576
diff
changeset
|
57 move->set_data((intptr_t) value); |
13576
4e679d50ba9a
Move data section building code to Java.
Roland Schatz <roland.schatz@oracle.com>
parents:
13553
diff
changeset
|
58 |
14561
e14198669e5c
Make data patch system use vm specific NarrowOop kind.
Roland Schatz <roland.schatz@oracle.com>
parents:
13576
diff
changeset
|
59 // We need two relocations: one on the sethi and one on the add. |
e14198669e5c
Make data patch system use vm specific NarrowOop kind.
Roland Schatz <roland.schatz@oracle.com>
parents:
13576
diff
changeset
|
60 int oop_index = _oop_recorder->find_index(value); |
e14198669e5c
Make data patch system use vm specific NarrowOop kind.
Roland Schatz <roland.schatz@oracle.com>
parents:
13576
diff
changeset
|
61 RelocationHolder rspec = oop_Relocation::spec(oop_index); |
e14198669e5c
Make data patch system use vm specific NarrowOop kind.
Roland Schatz <roland.schatz@oracle.com>
parents:
13576
diff
changeset
|
62 _instructions->relocate(pc + NativeMovConstReg::sethi_offset, rspec); |
e14198669e5c
Make data patch system use vm specific NarrowOop kind.
Roland Schatz <roland.schatz@oracle.com>
parents:
13576
diff
changeset
|
63 _instructions->relocate(pc + NativeMovConstReg::add_offset, rspec); |
e14198669e5c
Make data patch system use vm specific NarrowOop kind.
Roland Schatz <roland.schatz@oracle.com>
parents:
13576
diff
changeset
|
64 } |
e14198669e5c
Make data patch system use vm specific NarrowOop kind.
Roland Schatz <roland.schatz@oracle.com>
parents:
13576
diff
changeset
|
65 } |
11233 | 66 |
18176
c2270ad35f57
Better construction of data section and data patches.
Roland Schatz <roland.schatz@oracle.com>
parents:
17024
diff
changeset
|
67 void CodeInstaller::pd_patch_DataSectionReference(int pc_offset, int data_offset) { |
14561
e14198669e5c
Make data patch system use vm specific NarrowOop kind.
Roland Schatz <roland.schatz@oracle.com>
parents:
13576
diff
changeset
|
68 address pc = _instructions->start() + pc_offset; |
16316
989ab80382c1
Using absolute addressing instead of pc relative in fixup.
Stefan Anzinger <stefan.anzinger@gmail.com>
parents:
15582
diff
changeset
|
69 address const_start = _constants->start(); |
18176
c2270ad35f57
Better construction of data section and data patches.
Roland Schatz <roland.schatz@oracle.com>
parents:
17024
diff
changeset
|
70 address dest = _constants->start() + data_offset; |
11233 | 71 |
16631
0e34c7fbd288
[SPARC] Add relocation info for constant reference to constant section
Stefan Anzinger <stefan.anzinger@gmail.com>
parents:
16316
diff
changeset
|
72 _instructions->relocate(pc + NativeMovConstReg::sethi_offset, internal_word_Relocation::spec((address) dest)); |
0e34c7fbd288
[SPARC] Add relocation info for constant reference to constant section
Stefan Anzinger <stefan.anzinger@gmail.com>
parents:
16316
diff
changeset
|
73 _instructions->relocate(pc + NativeMovConstReg::add_offset, internal_word_Relocation::spec((address) dest)); |
21559
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21255
diff
changeset
|
74 TRACE_jvmci_3("relocating at %p with destination at %p (%d)", pc, dest, data_offset); |
9934
0f7ca53be929
CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff
changeset
|
75 } |
0f7ca53be929
CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff
changeset
|
76 |
15123
7ccd2a1df0fa
made SPARC compile again; moved graalCodeInstaller_<arch>.hpp to .cpp files
twisti
parents:
14574
diff
changeset
|
77 void CodeInstaller::pd_relocate_CodeBlob(CodeBlob* cb, NativeInstruction* inst) { |
9934
0f7ca53be929
CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff
changeset
|
78 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
|
79 } |
0f7ca53be929
CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff
changeset
|
80 |
15123
7ccd2a1df0fa
made SPARC compile again; moved graalCodeInstaller_<arch>.hpp to .cpp files
twisti
parents:
14574
diff
changeset
|
81 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
|
82 address pc = (address) inst; |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
10792
diff
changeset
|
83 if (inst->is_call()) { |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
10792
diff
changeset
|
84 NativeCall* call = nativeCall_at(pc); |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
10792
diff
changeset
|
85 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
|
86 _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
|
87 } else if (inst->is_sethi()) { |
10871
c3b09d69dfde
SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
10854
diff
changeset
|
88 NativeJump* jump = nativeJump_at(pc); |
c3b09d69dfde
SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
10854
diff
changeset
|
89 jump->set_jump_destination((address) foreign_call_destination); |
c3b09d69dfde
SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
10854
diff
changeset
|
90 _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
|
91 } else { |
10871
c3b09d69dfde
SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
10854
diff
changeset
|
92 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
|
93 } |
21559
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21255
diff
changeset
|
94 TRACE_jvmci_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
|
95 } |
0f7ca53be929
CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff
changeset
|
96 |
15123
7ccd2a1df0fa
made SPARC compile again; moved graalCodeInstaller_<arch>.hpp to .cpp files
twisti
parents:
14574
diff
changeset
|
97 void CodeInstaller::pd_relocate_JavaMethod(oop hotspot_method, jint pc_offset) { |
10684 | 98 #ifdef ASSERT |
99 Method* method = NULL; | |
100 // we need to check, this might also be an unresolved method | |
18222
a8cff27ca2e1
converted HotSpotResolvedJavaMethod to an interface
Doug Simon <doug.simon@oracle.com>
parents:
18176
diff
changeset
|
101 if (hotspot_method->is_a(HotSpotResolvedJavaMethodImpl::klass())) { |
10684 | 102 method = getMethodFromHotSpotMethod(hotspot_method); |
103 } | |
104 #endif | |
105 switch (_next_call_type) { | |
14574
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
106 case INLINE_INVOKE: |
10684 | 107 break; |
14574
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
108 case INVOKEVIRTUAL: |
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
109 case INVOKEINTERFACE: { |
10684 | 110 assert(method == NULL || !method->is_static(), "cannot call static method with invokeinterface"); |
111 NativeCall* call = nativeCall_at(_instructions->start() + pc_offset); | |
112 call->set_destination(SharedRuntime::get_resolve_virtual_call_stub()); | |
10792 | 113 _instructions->relocate(call->instruction_address(), virtual_call_Relocation::spec(_invoke_mark_pc)); |
10684 | 114 break; |
115 } | |
14574
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
116 case INVOKESTATIC: { |
10684 | 117 assert(method == NULL || method->is_static(), "cannot call non-static method with invokestatic"); |
118 NativeCall* call = nativeCall_at(_instructions->start() + pc_offset); | |
119 call->set_destination(SharedRuntime::get_resolve_static_call_stub()); | |
10792 | 120 _instructions->relocate(call->instruction_address(), relocInfo::static_call_type); |
10684 | 121 break; |
122 } | |
14574
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
123 case INVOKESPECIAL: { |
10684 | 124 assert(method == NULL || !method->is_static(), "cannot call static method with invokespecial"); |
125 NativeCall* call = nativeCall_at(_instructions->start() + pc_offset); | |
126 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
|
127 _instructions->relocate(call->instruction_address(), relocInfo::opt_virtual_call_type); |
10684 | 128 break; |
129 } | |
130 default: | |
131 fatal("invalid _next_call_type value"); | |
132 break; | |
133 } | |
9934
0f7ca53be929
CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff
changeset
|
134 } |
0f7ca53be929
CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff
changeset
|
135 |
15123
7ccd2a1df0fa
made SPARC compile again; moved graalCodeInstaller_<arch>.hpp to .cpp files
twisti
parents:
14574
diff
changeset
|
136 void CodeInstaller::pd_relocate_poll(address pc, jint mark) { |
11799 | 137 switch (mark) { |
15123
7ccd2a1df0fa
made SPARC compile again; moved graalCodeInstaller_<arch>.hpp to .cpp files
twisti
parents:
14574
diff
changeset
|
138 case POLL_NEAR: |
11799 | 139 fatal("unimplemented"); |
15123
7ccd2a1df0fa
made SPARC compile again; moved graalCodeInstaller_<arch>.hpp to .cpp files
twisti
parents:
14574
diff
changeset
|
140 break; |
14574
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
141 case POLL_FAR: |
13553
d49f00604347
removed poll_Relocation::pollingForm type and associated data field and rely solely on format field of safepoint relocation entries when deciding whether or not to relocate the operand of a safepoint poll instruction
Doug Simon <doug.simon@oracle.com>
parents:
13515
diff
changeset
|
142 _instructions->relocate(pc, relocInfo::poll_type); |
11799 | 143 break; |
15123
7ccd2a1df0fa
made SPARC compile again; moved graalCodeInstaller_<arch>.hpp to .cpp files
twisti
parents:
14574
diff
changeset
|
144 case POLL_RETURN_NEAR: |
11799 | 145 fatal("unimplemented"); |
15123
7ccd2a1df0fa
made SPARC compile again; moved graalCodeInstaller_<arch>.hpp to .cpp files
twisti
parents:
14574
diff
changeset
|
146 break; |
14574
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
147 case POLL_RETURN_FAR: |
13553
d49f00604347
removed poll_Relocation::pollingForm type and associated data field and rely solely on format field of safepoint relocation entries when deciding whether or not to relocate the operand of a safepoint poll instruction
Doug Simon <doug.simon@oracle.com>
parents:
13515
diff
changeset
|
148 _instructions->relocate(pc, relocInfo::poll_return_type); |
11799 | 149 break; |
150 default: | |
151 fatal("invalid mark value"); | |
152 break; | |
153 } | |
154 } | |
17024
4e2d34d7715b
[SPARC/AMD64] Splitting up oopmap generation for Intel XMM and SPARC Floatingpoint registers
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
16631
diff
changeset
|
155 |
21559
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21255
diff
changeset
|
156 // convert JVMCI register indices (as used in oop maps) to HotSpot registers |
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21255
diff
changeset
|
157 VMReg CodeInstaller::get_hotspot_reg(jint jvmci_reg) { |
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21255
diff
changeset
|
158 if (jvmci_reg < RegisterImpl::number_of_registers) { |
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21255
diff
changeset
|
159 return as_Register(jvmci_reg)->as_VMReg(); |
17024
4e2d34d7715b
[SPARC/AMD64] Splitting up oopmap generation for Intel XMM and SPARC Floatingpoint registers
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
16631
diff
changeset
|
160 } else { |
21559
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21255
diff
changeset
|
161 jint floatRegisterNumber = jvmci_reg - RegisterImpl::number_of_registers; |
17024
4e2d34d7715b
[SPARC/AMD64] Splitting up oopmap generation for Intel XMM and SPARC Floatingpoint registers
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
16631
diff
changeset
|
162 floatRegisterNumber += MAX2(0, floatRegisterNumber-32); // Beginning with f32, only every second register is going to be addressed |
4e2d34d7715b
[SPARC/AMD64] Splitting up oopmap generation for Intel XMM and SPARC Floatingpoint registers
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
16631
diff
changeset
|
163 if (floatRegisterNumber < FloatRegisterImpl::number_of_registers) { |
4e2d34d7715b
[SPARC/AMD64] Splitting up oopmap generation for Intel XMM and SPARC Floatingpoint registers
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
16631
diff
changeset
|
164 return as_FloatRegister(floatRegisterNumber)->as_VMReg(); |
4e2d34d7715b
[SPARC/AMD64] Splitting up oopmap generation for Intel XMM and SPARC Floatingpoint registers
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
16631
diff
changeset
|
165 } |
4e2d34d7715b
[SPARC/AMD64] Splitting up oopmap generation for Intel XMM and SPARC Floatingpoint registers
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
16631
diff
changeset
|
166 ShouldNotReachHere(); |
4e2d34d7715b
[SPARC/AMD64] Splitting up oopmap generation for Intel XMM and SPARC Floatingpoint registers
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
16631
diff
changeset
|
167 return NULL; |
4e2d34d7715b
[SPARC/AMD64] Splitting up oopmap generation for Intel XMM and SPARC Floatingpoint registers
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
16631
diff
changeset
|
168 } |
4e2d34d7715b
[SPARC/AMD64] Splitting up oopmap generation for Intel XMM and SPARC Floatingpoint registers
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
16631
diff
changeset
|
169 } |
4e2d34d7715b
[SPARC/AMD64] Splitting up oopmap generation for Intel XMM and SPARC Floatingpoint registers
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
16631
diff
changeset
|
170 |
4e2d34d7715b
[SPARC/AMD64] Splitting up oopmap generation for Intel XMM and SPARC Floatingpoint registers
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
16631
diff
changeset
|
171 bool CodeInstaller::is_general_purpose_reg(VMReg hotspotRegister) { |
4e2d34d7715b
[SPARC/AMD64] Splitting up oopmap generation for Intel XMM and SPARC Floatingpoint registers
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
16631
diff
changeset
|
172 return !hotspotRegister->is_FloatRegister(); |
4e2d34d7715b
[SPARC/AMD64] Splitting up oopmap generation for Intel XMM and SPARC Floatingpoint registers
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
16631
diff
changeset
|
173 } |