hotspot/src/cpu/sparc/vm/jniFastGetField_sparc.cpp
address JNI_FastGetField::generate_fast_get_long_field() {
{- -------------------------------------------
(1) JNI_FastGetField::generate_fast_get_int_field0() とほぼ同様.
(32bit 時には2回のロードが必要なので (speculative_load_pclist 等への設定処理の関係上) 別関数になっているのだと思われる.)
---------------------------------------- -}
const char *name = "jni_fast_GetLongField";
ResourceMark rm;
BufferBlob* blob = BufferBlob::create(name, BUFFER_SIZE*wordSize);
CodeBuffer cbuf(blob);
MacroAssembler* masm = new MacroAssembler(&cbuf);
address fast_entry = __ pc();
Label label1, label2;
AddressLiteral cnt_addrlit(SafepointSynchronize::safepoint_counter_addr());
__ sethi (cnt_addrlit, G3);
Address cnt_addr(G3, cnt_addrlit.low10());
__ ld (cnt_addr, G4);
__ andcc (G4, 1, G0);
__ br (Assembler::notZero, false, Assembler::pn, label1);
__ delayed()->srl (O2, 2, O4);
__ ld_ptr (O1, 0, O5);
__ add (O5, O4, O5);
#ifndef _LP64
assert(count < LIST_CAPACITY-1, "LIST_CAPACITY too small");
speculative_load_pclist[count++] = __ pc();
__ ld (O5, 0, G2);
speculative_load_pclist[count] = __ pc();
__ ld (O5, 4, O3);
#else
assert(count < LIST_CAPACITY, "LIST_CAPACITY too small");
speculative_load_pclist[count] = __ pc();
__ ldx (O5, 0, O3);
#endif
__ ld (cnt_addr, G1);
__ cmp (G1, G4);
__ br (Assembler::notEqual, false, Assembler::pn, label2);
__ delayed()->mov (O7, G1);
#ifndef _LP64
__ mov (G2, O0);
__ retl ();
__ delayed()->mov (O3, O1);
#else
__ retl ();
__ delayed()->mov (O3, O0);
#endif
#ifndef _LP64
slowcase_entry_pclist[count-1] = __ pc();
slowcase_entry_pclist[count++] = __ pc() ;
#else
slowcase_entry_pclist[count++] = __ pc();
#endif
__ bind (label1);
__ mov (O7, G1);
address slow_case_addr = jni_GetLongField_addr();
__ bind (label2);
__ call (slow_case_addr, relocInfo::none);
__ delayed()->mov (G1, O7);
__ flush ();
return fast_entry;
}
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.