Mercurial > hg > graal-compiler
annotate src/cpu/sparc/vm/graalCodeInstaller_sparc.cpp @ 17073:1d69b5c58bfe
Insert proxies when peeking through proxy for array length
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Tue, 09 Sep 2014 11:53:53 +0200 |
parents | 4e2d34d7715b |
children | c2270ad35f57 |
rev | line source |
---|---|
9934
0f7ca53be929
CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff
changeset
|
1 /* |
15123
7ccd2a1df0fa
made SPARC compile again; moved graalCodeInstaller_<arch>.hpp to .cpp files
twisti
parents:
14574
diff
changeset
|
2 * Copyright (c) 2013, 2014, 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 |
15123
7ccd2a1df0fa
made SPARC compile again; moved graalCodeInstaller_<arch>.hpp to .cpp files
twisti
parents:
14574
diff
changeset
|
24 #include "graal/graalCodeInstaller.hpp" |
15582
063ec2920d21
made Graal runtime initialization in hosted mode lazy
Doug Simon <doug.simon@oracle.com>
parents:
15123
diff
changeset
|
25 #include "graal/graalRuntime.hpp" |
10684 | 26 #include "graal/graalCompilerToVM.hpp" |
27 #include "graal/graalJavaAccess.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 |
15123
7ccd2a1df0fa
made SPARC compile again; moved graalCodeInstaller_<arch>.hpp to .cpp files
twisti
parents:
14574
diff
changeset
|
43 void CodeInstaller::pd_patch_OopData(int pc_offset, oop data) { |
7ccd2a1df0fa
made SPARC compile again; moved graalCodeInstaller_<arch>.hpp to .cpp files
twisti
parents:
14574
diff
changeset
|
44 address pc = _instructions->start() + pc_offset; |
7ccd2a1df0fa
made SPARC compile again; moved graalCodeInstaller_<arch>.hpp to .cpp files
twisti
parents:
14574
diff
changeset
|
45 Handle obj = OopData::object(data); |
7ccd2a1df0fa
made SPARC compile again; moved graalCodeInstaller_<arch>.hpp to .cpp files
twisti
parents:
14574
diff
changeset
|
46 jobject value = JNIHandles::make_local(obj()); |
7ccd2a1df0fa
made SPARC compile again; moved graalCodeInstaller_<arch>.hpp to .cpp files
twisti
parents:
14574
diff
changeset
|
47 if (OopData::compressed(data)) { |
14561
e14198669e5c
Make data patch system use vm specific NarrowOop kind.
Roland Schatz <roland.schatz@oracle.com>
parents:
13576
diff
changeset
|
48 fatal("unimplemented: narrow oop relocation"); |
e14198669e5c
Make data patch system use vm specific NarrowOop kind.
Roland Schatz <roland.schatz@oracle.com>
parents:
13576
diff
changeset
|
49 } else { |
e14198669e5c
Make data patch system use vm specific NarrowOop kind.
Roland Schatz <roland.schatz@oracle.com>
parents:
13576
diff
changeset
|
50 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
|
51 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
|
52 |
14561
e14198669e5c
Make data patch system use vm specific NarrowOop kind.
Roland Schatz <roland.schatz@oracle.com>
parents:
13576
diff
changeset
|
53 // 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
|
54 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
|
55 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
|
56 _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
|
57 _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
|
58 } |
e14198669e5c
Make data patch system use vm specific NarrowOop kind.
Roland Schatz <roland.schatz@oracle.com>
parents:
13576
diff
changeset
|
59 } |
11233 | 60 |
15123
7ccd2a1df0fa
made SPARC compile again; moved graalCodeInstaller_<arch>.hpp to .cpp files
twisti
parents:
14574
diff
changeset
|
61 void CodeInstaller::pd_patch_DataSectionReference(int pc_offset, oop data) { |
14561
e14198669e5c
Make data patch system use vm specific NarrowOop kind.
Roland Schatz <roland.schatz@oracle.com>
parents:
13576
diff
changeset
|
62 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
|
63 address const_start = _constants->start(); |
14561
e14198669e5c
Make data patch system use vm specific NarrowOop kind.
Roland Schatz <roland.schatz@oracle.com>
parents:
13576
diff
changeset
|
64 jint offset = DataSectionReference::offset(data); |
16631
0e34c7fbd288
[SPARC] Add relocation info for constant reference to constant section
Stefan Anzinger <stefan.anzinger@gmail.com>
parents:
16316
diff
changeset
|
65 address dest = _constants->start() + offset; |
11233 | 66 |
16631
0e34c7fbd288
[SPARC] Add relocation info for constant reference to constant section
Stefan Anzinger <stefan.anzinger@gmail.com>
parents:
16316
diff
changeset
|
67 _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
|
68 _instructions->relocate(pc + NativeMovConstReg::add_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
|
69 TRACE_graal_3("relocating at %p with destination at %p (%d)", pc, dest, offset); |
9934
0f7ca53be929
CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff
changeset
|
70 } |
0f7ca53be929
CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff
changeset
|
71 |
15123
7ccd2a1df0fa
made SPARC compile again; moved graalCodeInstaller_<arch>.hpp to .cpp files
twisti
parents:
14574
diff
changeset
|
72 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
|
73 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
|
74 } |
0f7ca53be929
CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff
changeset
|
75 |
15123
7ccd2a1df0fa
made SPARC compile again; moved graalCodeInstaller_<arch>.hpp to .cpp files
twisti
parents:
14574
diff
changeset
|
76 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
|
77 address pc = (address) inst; |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
10792
diff
changeset
|
78 if (inst->is_call()) { |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
10792
diff
changeset
|
79 NativeCall* call = nativeCall_at(pc); |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
10792
diff
changeset
|
80 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
|
81 _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
|
82 } else if (inst->is_sethi()) { |
10871
c3b09d69dfde
SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
10854
diff
changeset
|
83 NativeJump* jump = nativeJump_at(pc); |
c3b09d69dfde
SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
10854
diff
changeset
|
84 jump->set_jump_destination((address) foreign_call_destination); |
c3b09d69dfde
SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
10854
diff
changeset
|
85 _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
|
86 } else { |
10871
c3b09d69dfde
SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
10854
diff
changeset
|
87 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
|
88 } |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
10792
diff
changeset
|
89 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
|
90 } |
0f7ca53be929
CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
diff
changeset
|
91 |
15123
7ccd2a1df0fa
made SPARC compile again; moved graalCodeInstaller_<arch>.hpp to .cpp files
twisti
parents:
14574
diff
changeset
|
92 void CodeInstaller::pd_relocate_JavaMethod(oop hotspot_method, jint pc_offset) { |
10684 | 93 #ifdef ASSERT |
94 Method* method = NULL; | |
95 // we need to check, this might also be an unresolved method | |
96 if (hotspot_method->is_a(HotSpotResolvedJavaMethod::klass())) { | |
97 method = getMethodFromHotSpotMethod(hotspot_method); | |
98 } | |
99 #endif | |
100 switch (_next_call_type) { | |
14574
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
101 case INLINE_INVOKE: |
10684 | 102 break; |
14574
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
103 case INVOKEVIRTUAL: |
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
104 case INVOKEINTERFACE: { |
10684 | 105 assert(method == NULL || !method->is_static(), "cannot call static method with invokeinterface"); |
106 NativeCall* call = nativeCall_at(_instructions->start() + pc_offset); | |
107 call->set_destination(SharedRuntime::get_resolve_virtual_call_stub()); | |
10792 | 108 _instructions->relocate(call->instruction_address(), virtual_call_Relocation::spec(_invoke_mark_pc)); |
10684 | 109 break; |
110 } | |
14574
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
111 case INVOKESTATIC: { |
10684 | 112 assert(method == NULL || method->is_static(), "cannot call non-static method with invokestatic"); |
113 NativeCall* call = nativeCall_at(_instructions->start() + pc_offset); | |
114 call->set_destination(SharedRuntime::get_resolve_static_call_stub()); | |
10792 | 115 _instructions->relocate(call->instruction_address(), relocInfo::static_call_type); |
10684 | 116 break; |
117 } | |
14574
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
118 case INVOKESPECIAL: { |
10684 | 119 assert(method == NULL || !method->is_static(), "cannot call static method with invokespecial"); |
120 NativeCall* call = nativeCall_at(_instructions->start() + pc_offset); | |
121 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
|
122 _instructions->relocate(call->instruction_address(), relocInfo::opt_virtual_call_type); |
10684 | 123 break; |
124 } | |
125 default: | |
126 fatal("invalid _next_call_type value"); | |
127 break; | |
128 } | |
9934
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 |
15123
7ccd2a1df0fa
made SPARC compile again; moved graalCodeInstaller_<arch>.hpp to .cpp files
twisti
parents:
14574
diff
changeset
|
131 void CodeInstaller::pd_relocate_poll(address pc, jint mark) { |
11799 | 132 switch (mark) { |
15123
7ccd2a1df0fa
made SPARC compile again; moved graalCodeInstaller_<arch>.hpp to .cpp files
twisti
parents:
14574
diff
changeset
|
133 case POLL_NEAR: |
11799 | 134 fatal("unimplemented"); |
15123
7ccd2a1df0fa
made SPARC compile again; moved graalCodeInstaller_<arch>.hpp to .cpp files
twisti
parents:
14574
diff
changeset
|
135 break; |
14574
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
136 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
|
137 _instructions->relocate(pc, relocInfo::poll_type); |
11799 | 138 break; |
15123
7ccd2a1df0fa
made SPARC compile again; moved graalCodeInstaller_<arch>.hpp to .cpp files
twisti
parents:
14574
diff
changeset
|
139 case POLL_RETURN_NEAR: |
11799 | 140 fatal("unimplemented"); |
15123
7ccd2a1df0fa
made SPARC compile again; moved graalCodeInstaller_<arch>.hpp to .cpp files
twisti
parents:
14574
diff
changeset
|
141 break; |
14574
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
142 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
|
143 _instructions->relocate(pc, relocInfo::poll_return_type); |
11799 | 144 break; |
145 default: | |
146 fatal("invalid mark value"); | |
147 break; | |
148 } | |
149 } | |
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
|
150 |
4e2d34d7715b
[SPARC/AMD64] Splitting up oopmap generation for Intel XMM and SPARC Floatingpoint registers
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
16631
diff
changeset
|
151 // convert Graal register indices (as used in oop maps) to HotSpot 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
|
152 VMReg CodeInstaller::get_hotspot_reg(jint graal_reg) { |
4e2d34d7715b
[SPARC/AMD64] Splitting up oopmap generation for Intel XMM and SPARC Floatingpoint registers
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
16631
diff
changeset
|
153 if (graal_reg < RegisterImpl::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
|
154 return as_Register(graal_reg)->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
|
155 } else { |
4e2d34d7715b
[SPARC/AMD64] Splitting up oopmap generation for Intel XMM and SPARC Floatingpoint registers
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
16631
diff
changeset
|
156 jint floatRegisterNumber = graal_reg - RegisterImpl::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
|
157 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
|
158 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
|
159 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
|
160 } |
4e2d34d7715b
[SPARC/AMD64] Splitting up oopmap generation for Intel XMM and SPARC Floatingpoint registers
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
16631
diff
changeset
|
161 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
|
162 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
|
163 } |
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 } |
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 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
|
167 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
|
168 } |