comparison src/share/vm/graal/graalCodeInstaller.cpp @ 16589:6bdd2ec553eb

handle HotSpotCompressedNullConstant in graalCodeInstaller
author Lukas Stadler <lukas.stadler@oracle.com>
date Wed, 23 Jul 2014 15:01:58 +0200
parents a7d9b88ecd68
children e7b7a5be4d21
comparison
equal deleted inserted replaced
16588:4209ec855c1c 16589:6bdd2ec553eb
238 // this seems weird, but the same value is used in c1_LinearScan 238 // this seems weird, but the same value is used in c1_LinearScan
239 locationType = Location::normal; 239 locationType = Location::normal;
240 } else { 240 } else {
241 locationType = Location::dbl; 241 locationType = Location::dbl;
242 } 242 }
243 assert(!reference, "unexpected type in floating point register");
243 #ifdef TARGET_ARCH_x86 244 #ifdef TARGET_ARCH_x86
244 ScopeValue* value = new LocationValue(Location::new_reg_loc(locationType, as_XMMRegister(number - 16)->as_VMReg())); 245 ScopeValue* value = new LocationValue(Location::new_reg_loc(locationType, as_XMMRegister(number - 16)->as_VMReg()));
245 if (type == T_DOUBLE && !reference) { 246 if (type == T_DOUBLE) {
246 second = value; 247 second = value;
247 } 248 }
248 return value; 249 return value;
249 #else 250 #else
250 #ifdef TARGET_ARCH_sparc 251 #ifdef TARGET_ARCH_sparc
251 ScopeValue* value = new LocationValue(Location::new_reg_loc(locationType, as_FloatRegister(number)->as_VMReg())); 252 ScopeValue* value = new LocationValue(Location::new_reg_loc(locationType, as_FloatRegister(number)->as_VMReg()));
252 if (type == T_DOUBLE && !reference) { 253 if (type == T_DOUBLE) {
253 second = value; 254 second = value;
254 } 255 }
255 return value; 256 return value;
256 #else 257 #else
257 ShouldNotReachHere("Platform currently does not support floating point values."); 258 ShouldNotReachHere("Platform currently does not support floating point values.");
263 if (type == T_LONG) { 264 if (type == T_LONG) {
264 locationType = reference ? Location::oop : Location::lng; 265 locationType = reference ? Location::oop : Location::lng;
265 } else if (type == T_INT) { 266 } else if (type == T_INT) {
266 locationType = reference ? Location::narrowoop : Location::normal; 267 locationType = reference ? Location::narrowoop : Location::normal;
267 } else if (type == T_FLOAT) { 268 } else if (type == T_FLOAT) {
269 assert(!reference, "unexpected type in stack slot");
268 locationType = Location::normal; 270 locationType = Location::normal;
269 } else if (type == T_DOUBLE) { 271 } else if (type == T_DOUBLE) {
272 assert(!reference, "unexpected type in stack slot");
270 locationType = Location::dbl; 273 locationType = Location::dbl;
271 } else { 274 } else {
272 assert(type == T_OBJECT && reference, "unexpected type in stack slot"); 275 assert(type == T_OBJECT && reference, "unexpected type in stack slot");
273 locationType = Location::oop; 276 locationType = Location::oop;
274 } 277 }
294 second = new ConstantIntValue(0); 297 second = new ConstantIntValue(0);
295 return new ConstantLongValue(prim); 298 return new ConstantLongValue(prim);
296 } 299 }
297 } else { 300 } else {
298 assert(reference, "unexpected object constant type"); 301 assert(reference, "unexpected object constant type");
299 if (value->is_a(NullConstant::klass())) { 302 if (value->is_a(NullConstant::klass()) || value->is_a(HotSpotCompressedNullConstant::klass())) {
300 return new ConstantOopWriteValue(NULL); 303 return new ConstantOopWriteValue(NULL);
301 } else { 304 } else {
302 assert(value->is_a(HotSpotObjectConstant::klass()), "unexpected constant type"); 305 assert(value->is_a(HotSpotObjectConstant::klass()), "unexpected constant type");
303 oop obj = HotSpotObjectConstant::object(value); 306 oop obj = HotSpotObjectConstant::object(value);
304 assert(obj != NULL, "null value must be in NullConstant"); 307 assert(obj != NULL, "null value must be in NullConstant");