comparison src/share/vm/asm/assembler.hpp @ 2008:2f644f85485d

6961690: load oops from constant table on SPARC Summary: oops should be loaded from the constant table of an nmethod instead of materializing them with a long code sequence. Reviewed-by: never, kvn
author twisti
date Fri, 03 Dec 2010 01:34:31 -0800
parents f95d63e2154a
children b92c45f2bc75
comparison
equal deleted inserted replaced
2007:5ddfcf4b079e 2008:2f644f85485d
290 void end_a_stub(); 290 void end_a_stub();
291 // Ditto for constants. 291 // Ditto for constants.
292 address start_a_const(int required_space, int required_align = sizeof(double)); 292 address start_a_const(int required_space, int required_align = sizeof(double));
293 void end_a_const(); 293 void end_a_const();
294 294
295 // fp constants support 295 // constants support
296 address long_constant(jlong c) {
297 address ptr = start_a_const(sizeof(c), sizeof(c));
298 if (ptr != NULL) {
299 *(jlong*)ptr = c;
300 _code_pos = ptr + sizeof(c);
301 end_a_const();
302 }
303 return ptr;
304 }
296 address double_constant(jdouble c) { 305 address double_constant(jdouble c) {
297 address ptr = start_a_const(sizeof(c), sizeof(c)); 306 address ptr = start_a_const(sizeof(c), sizeof(c));
298 if (ptr != NULL) { 307 if (ptr != NULL) {
299 *(jdouble*)ptr = c; 308 *(jdouble*)ptr = c;
300 _code_pos = ptr + sizeof(c); 309 _code_pos = ptr + sizeof(c);
304 } 313 }
305 address float_constant(jfloat c) { 314 address float_constant(jfloat c) {
306 address ptr = start_a_const(sizeof(c), sizeof(c)); 315 address ptr = start_a_const(sizeof(c), sizeof(c));
307 if (ptr != NULL) { 316 if (ptr != NULL) {
308 *(jfloat*)ptr = c; 317 *(jfloat*)ptr = c;
318 _code_pos = ptr + sizeof(c);
319 end_a_const();
320 }
321 return ptr;
322 }
323 address address_constant(address c) {
324 address ptr = start_a_const(sizeof(c), sizeof(c));
325 if (ptr != NULL) {
326 *(address*)ptr = c;
309 _code_pos = ptr + sizeof(c); 327 _code_pos = ptr + sizeof(c);
310 end_a_const(); 328 end_a_const();
311 } 329 }
312 return ptr; 330 return ptr;
313 } 331 }
319 _code_pos = ptr + sizeof(c); 337 _code_pos = ptr + sizeof(c);
320 end_a_const(); 338 end_a_const();
321 } 339 }
322 return ptr; 340 return ptr;
323 } 341 }
324 inline address address_constant(Label& L);
325 inline address address_table_constant(GrowableArray<Label*> label);
326 342
327 // Bootstrapping aid to cope with delayed determination of constants. 343 // Bootstrapping aid to cope with delayed determination of constants.
328 // Returns a static address which will eventually contain the constant. 344 // Returns a static address which will eventually contain the constant.
329 // The value zero (NULL) stands instead of a constant which is still uncomputed. 345 // The value zero (NULL) stands instead of a constant which is still uncomputed.
330 // Thus, the eventual value of the constant must not be zero. 346 // Thus, the eventual value of the constant must not be zero.