Mercurial > hg > graal-jvmci-8
comparison src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp @ 4762:069ab3f976d3
7118863: Move sizeof(klassOopDesc) into the *Klass::*_offset_in_bytes() functions
Summary: Moved sizeof(klassOopDesc), changed the return type to ByteSize and removed the _in_bytes suffix.
Reviewed-by: never, bdelsart, coleenp, jrose
author | stefank |
---|---|
date | Wed, 07 Dec 2011 11:35:03 +0100 |
parents | cec1757a0134 |
children | a79cb7c55012 |
comparison
equal
deleted
inserted
replaced
4761:65149e74c706 | 4762:069ab3f976d3 |
---|---|
300 // check that this code is being executed by the initializing | 300 // check that this code is being executed by the initializing |
301 // thread. | 301 // thread. |
302 assert(_obj != noreg, "must be a valid register"); | 302 assert(_obj != noreg, "must be a valid register"); |
303 assert(_oop_index >= 0, "must have oop index"); | 303 assert(_oop_index >= 0, "must have oop index"); |
304 __ load_heap_oop(_obj, java_lang_Class::klass_offset_in_bytes(), G3); | 304 __ load_heap_oop(_obj, java_lang_Class::klass_offset_in_bytes(), G3); |
305 __ ld_ptr(G3, instanceKlass::init_thread_offset_in_bytes() + sizeof(klassOopDesc), G3); | 305 __ ld_ptr(G3, in_bytes(instanceKlass::init_thread_offset()), G3); |
306 __ cmp_and_brx_short(G2_thread, G3, Assembler::notEqual, Assembler::pn, call_patch); | 306 __ cmp_and_brx_short(G2_thread, G3, Assembler::notEqual, Assembler::pn, call_patch); |
307 | 307 |
308 // load_klass patches may execute the patched code before it's | 308 // load_klass patches may execute the patched code before it's |
309 // copied back into place so we need to jump back into the main | 309 // copied back into place so we need to jump back into the main |
310 // code of the nmethod to continue execution. | 310 // code of the nmethod to continue execution. |
469 assert(tmp()->is_register(), "sanity"); | 469 assert(tmp()->is_register(), "sanity"); |
470 Register tmp_reg = tmp()->as_register(); | 470 Register tmp_reg = tmp()->as_register(); |
471 | 471 |
472 __ load_klass(src_reg, tmp_reg); | 472 __ load_klass(src_reg, tmp_reg); |
473 | 473 |
474 Address ref_type_adr(tmp_reg, instanceKlass::reference_type_offset_in_bytes() + sizeof(oopDesc)); | 474 Address ref_type_adr(tmp_reg, instanceKlass::reference_type_offset()); |
475 __ ld(ref_type_adr, tmp_reg); | 475 __ ld(ref_type_adr, tmp_reg); |
476 | 476 |
477 // _reference_type field is of type ReferenceType (enum) | 477 // _reference_type field is of type ReferenceType (enum) |
478 assert(REF_NONE == 0, "check this code"); | 478 assert(REF_NONE == 0, "check this code"); |
479 __ cmp_zero_and_br(Assembler::equal, tmp_reg, _continuation, /*annul*/false, Assembler::pt); | 479 __ cmp_zero_and_br(Assembler::equal, tmp_reg, _continuation, /*annul*/false, Assembler::pt); |