Mercurial > hg > truffle
comparison src/cpu/sparc/vm/graalCodeInstaller_sparc.cpp @ 17024:4e2d34d7715b
[SPARC/AMD64] Splitting up oopmap generation for Intel XMM and SPARC Floatingpoint registers
author | Stefan Anzinger <stefan.anzinger@oracle.com> |
---|---|
date | Tue, 02 Sep 2014 17:16:26 -0700 |
parents | 0e34c7fbd288 |
children | c2270ad35f57 |
comparison
equal
deleted
inserted
replaced
17023:586c1bdd73b8 | 17024:4e2d34d7715b |
---|---|
23 | 23 |
24 #include "graal/graalCodeInstaller.hpp" | 24 #include "graal/graalCodeInstaller.hpp" |
25 #include "graal/graalRuntime.hpp" | 25 #include "graal/graalRuntime.hpp" |
26 #include "graal/graalCompilerToVM.hpp" | 26 #include "graal/graalCompilerToVM.hpp" |
27 #include "graal/graalJavaAccess.hpp" | 27 #include "graal/graalJavaAccess.hpp" |
28 #include "vmreg_sparc.inline.hpp" | |
28 | 29 |
29 jint CodeInstaller::pd_next_offset(NativeInstruction* inst, jint pc_offset, oop method) { | 30 jint CodeInstaller::pd_next_offset(NativeInstruction* inst, jint pc_offset, oop method) { |
30 if (inst->is_call() || inst->is_jump()) { | 31 if (inst->is_call() || inst->is_jump()) { |
31 return pc_offset + NativeCall::instruction_size; | 32 return pc_offset + NativeCall::instruction_size; |
32 } else if (inst->is_call_reg()) { | 33 } else if (inst->is_call_reg()) { |
144 default: | 145 default: |
145 fatal("invalid mark value"); | 146 fatal("invalid mark value"); |
146 break; | 147 break; |
147 } | 148 } |
148 } | 149 } |
150 | |
151 // convert Graal register indices (as used in oop maps) to HotSpot registers | |
152 VMReg CodeInstaller::get_hotspot_reg(jint graal_reg) { | |
153 if (graal_reg < RegisterImpl::number_of_registers) { | |
154 return as_Register(graal_reg)->as_VMReg(); | |
155 } else { | |
156 jint floatRegisterNumber = graal_reg - RegisterImpl::number_of_registers; | |
157 floatRegisterNumber += MAX2(0, floatRegisterNumber-32); // Beginning with f32, only every second register is going to be addressed | |
158 if (floatRegisterNumber < FloatRegisterImpl::number_of_registers) { | |
159 return as_FloatRegister(floatRegisterNumber)->as_VMReg(); | |
160 } | |
161 ShouldNotReachHere(); | |
162 return NULL; | |
163 } | |
164 } | |
165 | |
166 bool CodeInstaller::is_general_purpose_reg(VMReg hotspotRegister) { | |
167 return !hotspotRegister->is_FloatRegister(); | |
168 } |