comparison src/cpu/x86/vm/graalCodeInstaller_x86.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 063ec2920d21
children c2270ad35f57
comparison
equal deleted inserted replaced
17023:586c1bdd73b8 17024:4e2d34d7715b
30 #include "graal/graalCompilerToVM.hpp" 30 #include "graal/graalCompilerToVM.hpp"
31 #include "graal/graalRuntime.hpp" 31 #include "graal/graalRuntime.hpp"
32 #include "asm/register.hpp" 32 #include "asm/register.hpp"
33 #include "classfile/vmSymbols.hpp" 33 #include "classfile/vmSymbols.hpp"
34 #include "code/vmreg.hpp" 34 #include "code/vmreg.hpp"
35 #include "vmreg_x86.inline.hpp"
35 36
36 jint CodeInstaller::pd_next_offset(NativeInstruction* inst, jint pc_offset, oop method) { 37 jint CodeInstaller::pd_next_offset(NativeInstruction* inst, jint pc_offset, oop method) {
37 if (inst->is_call() || inst->is_jump()) { 38 if (inst->is_call() || inst->is_jump()) {
38 assert(NativeCall::instruction_size == (int)NativeJump::instruction_size, "unexpected size"); 39 assert(NativeCall::instruction_size == (int)NativeJump::instruction_size, "unexpected size");
39 return (pc_offset + NativeCall::instruction_size); 40 return (pc_offset + NativeCall::instruction_size);
207 default: 208 default:
208 fatal("invalid mark value"); 209 fatal("invalid mark value");
209 break; 210 break;
210 } 211 }
211 } 212 }
213
214 // convert Graal register indices (as used in oop maps) to HotSpot registers
215 VMReg CodeInstaller::get_hotspot_reg(jint graal_reg) {
216 if (graal_reg < RegisterImpl::number_of_registers) {
217 return as_Register(graal_reg)->as_VMReg();
218 } else {
219 jint floatRegisterNumber = graal_reg - RegisterImpl::number_of_registers;
220 if (floatRegisterNumber < XMMRegisterImpl::number_of_registers) {
221 return as_XMMRegister(floatRegisterNumber)->as_VMReg();
222 }
223 ShouldNotReachHere();
224 return NULL;
225 }
226 }
227
228 bool CodeInstaller::is_general_purpose_reg(VMReg hotspotRegister) {
229 return !(hotspotRegister->is_FloatRegister() || hotspotRegister->is_XMMRegister());
230 }