Mercurial > hg > graal-compiler
comparison src/share/vm/graal/graalCodeInstaller.cpp @ 16645:8c70d65ec04a
[SPARC] Fix issues when deoptimizing with floats in local scope.
# SIGSEGV (0xb) at pc=0xffffffff35d71608, pid=2280, tid=2
# V [libjvm.so+0x1871608] StackValue*StackValue::create_stack_value(const frame*,const RegisterMap*,ScopeValue*)+0x360
author | Stefan Anzinger <stefan.anzinger@gmail.com> |
---|---|
date | Fri, 25 Jul 2014 20:54:28 -0700 |
parents | 9a07bf8467a6 |
children | e7b7a5be4d21 |
comparison
equal
deleted
inserted
replaced
16644:fa14ceabaf15 | 16645:8c70d65ec04a |
---|---|
66 #ifdef TARGET_ARCH_x86 | 66 #ifdef TARGET_ARCH_x86 |
67 if (remainder < XMMRegisterImpl::number_of_registers) { | 67 if (remainder < XMMRegisterImpl::number_of_registers) { |
68 return as_XMMRegister(remainder)->as_VMReg(); | 68 return as_XMMRegister(remainder)->as_VMReg(); |
69 } | 69 } |
70 #endif | 70 #endif |
71 #ifdef TARGET_ARCH_sparc | |
72 if (remainder < FloatRegisterImpl::number_of_registers) { | |
73 return as_FloatRegister(remainder)->as_VMReg(); | |
74 } | |
75 #endif | |
71 ShouldNotReachHere(); | 76 ShouldNotReachHere(); |
72 return NULL; | 77 return NULL; |
73 } | 78 } |
74 } | 79 } |
75 | 80 |
125 VMReg reg = as_XMMRegister(i)->as_VMReg(); | 130 VMReg reg = as_XMMRegister(i)->as_VMReg(); |
126 int idx = RegisterImpl::number_of_registers + 4 * i; | 131 int idx = RegisterImpl::number_of_registers + 4 * i; |
127 for (jint j = 0; j < 4; j++) { | 132 for (jint j = 0; j < 4; j++) { |
128 set_vmreg_oops(map, reg->next(2 * j), register_map, idx + j); | 133 set_vmreg_oops(map, reg->next(2 * j), register_map, idx + j); |
129 } | 134 } |
135 } | |
136 #endif | |
137 #ifdef TARGET_ARCH_sparc | |
138 for (jint i = 0; i < FloatRegisterImpl::number_of_registers; i++) { | |
139 VMReg reg = as_FloatRegister(i)->as_VMReg(); | |
140 int idx = RegisterImpl::number_of_registers + i; | |
141 set_vmreg_oops(map, reg, register_map, idx); | |
130 } | 142 } |
131 #endif | 143 #endif |
132 } | 144 } |
133 | 145 |
134 for (jint i = 0; i < bitset_size(frame_map) / 3; i++) { | 146 for (jint i = 0; i < bitset_size(frame_map) / 3; i++) { |
208 Location::Type locationType = Location::normal; | 220 Location::Type locationType = Location::normal; |
209 if (type == T_OBJECT || type == T_ARRAY) locationType = Location::oop; | 221 if (type == T_OBJECT || type == T_ARRAY) locationType = Location::oop; |
210 | 222 |
211 if (value->is_a(RegisterValue::klass())) { | 223 if (value->is_a(RegisterValue::klass())) { |
212 jint number = code_Register::number(RegisterValue::reg(value)); | 224 jint number = code_Register::number(RegisterValue::reg(value)); |
225 jint encoding = code_Register::encoding(RegisterValue::reg(value)); | |
213 if (number < RegisterImpl::number_of_registers) { | 226 if (number < RegisterImpl::number_of_registers) { |
214 if (type == T_INT || type == T_FLOAT || type == T_SHORT || type == T_CHAR || type == T_BOOLEAN || type == T_BYTE || type == T_ADDRESS) { | 227 if (type == T_INT || type == T_FLOAT || type == T_SHORT || type == T_CHAR || type == T_BOOLEAN || type == T_BYTE || type == T_ADDRESS) { |
215 locationType = Location::int_in_long; | 228 locationType = Location::int_in_long; |
216 } else if (type == T_LONG) { | 229 } else if (type == T_LONG) { |
217 locationType = Location::lng; | 230 locationType = Location::lng; |
237 second = value; | 250 second = value; |
238 } | 251 } |
239 return value; | 252 return value; |
240 #else | 253 #else |
241 #ifdef TARGET_ARCH_sparc | 254 #ifdef TARGET_ARCH_sparc |
242 ScopeValue* value = new LocationValue(Location::new_reg_loc(locationType, as_FloatRegister(number)->as_VMReg())); | 255 ScopeValue* value = new LocationValue(Location::new_reg_loc(locationType, as_FloatRegister(encoding)->as_VMReg())); |
243 if (type == T_DOUBLE) { | 256 if (type == T_DOUBLE) { |
244 second = value; | 257 second = new ConstantIntValue(0); |
245 } | 258 } |
246 return value; | 259 return value; |
247 #else | 260 #else |
248 ShouldNotReachHere("Platform currently does not support floating point values."); | 261 ShouldNotReachHere("Platform currently does not support floating point values."); |
249 #endif | 262 #endif |