// Common register usage: // R3/F0: result // R3_ARG1: jni env // R4_ARG2: obj // R5_ARG3: jfield id
address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) { constchar *name; switch (type) { case T_BOOLEAN: name = "jni_fast_GetBooleanField"; break; case T_BYTE: name = "jni_fast_GetByteField"; break; case T_CHAR: name = "jni_fast_GetCharField"; break; case T_SHORT: name = "jni_fast_GetShortField"; break; case T_INT: name = "jni_fast_GetIntField"; break; case T_LONG: name = "jni_fast_GetLongField"; break; case T_FLOAT: name = "jni_fast_GetFloatField"; break; case T_DOUBLE: name = "jni_fast_GetDoubleField"; break; default: ShouldNotReachHere();
name = NULL; // unreachable
}
ResourceMark rm;
BufferBlob* blob = BufferBlob::create(name, BUFFER_SIZE);
CodeBuffer cbuf(blob);
MacroAssembler* masm = new MacroAssembler(&cbuf);
address fast_entry = __ function_entry();
if (support_IRIW_for_not_multiple_copy_atomic_cpu) { // Field may be volatile.
__ fence();
} else { // Using acquire to order wrt. JVMTI check and load of result.
__ isync(); // order wrt. to following load(s)
}
if (JvmtiExport::can_post_field_access()) { // Check to see if a field access watch has been set before we // take the fast path. int fac_offs = __ load_const_optimized(Rtmp, JvmtiExport::get_field_access_count_addr(),
R0, true);
__ lwa(Rtmp, fac_offs, Rtmp);
__ cmpwi(CCR0, Rtmp, 0);
__ bne(CCR0, slow);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.