mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 19:44:41 +02:00
Merge
This commit is contained in:
commit
77c73b6d4f
394 changed files with 6643 additions and 3533 deletions
|
@ -43,6 +43,9 @@
|
|||
#if INCLUDE_ALL_GCS
|
||||
#include "gc/g1/heapRegion.hpp"
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
#ifdef TRACE_HAVE_INTRINSICS
|
||||
#include "trace/traceMacros.hpp"
|
||||
#endif
|
||||
|
||||
#ifdef ASSERT
|
||||
#define __ gen()->lir(__FILE__, __LINE__)->
|
||||
|
@ -3086,42 +3089,7 @@ void LIRGenerator::do_RuntimeCall(address routine, Intrinsic* x) {
|
|||
__ move(reg, result);
|
||||
}
|
||||
|
||||
#ifdef TRACE_HAVE_INTRINSICS
|
||||
void LIRGenerator::do_ThreadIDIntrinsic(Intrinsic* x) {
|
||||
LIR_Opr thread = getThreadPointer();
|
||||
LIR_Opr osthread = new_pointer_register();
|
||||
__ move(new LIR_Address(thread, in_bytes(JavaThread::osthread_offset()), osthread->type()), osthread);
|
||||
size_t thread_id_size = OSThread::thread_id_size();
|
||||
if (thread_id_size == (size_t) BytesPerLong) {
|
||||
LIR_Opr id = new_register(T_LONG);
|
||||
__ move(new LIR_Address(osthread, in_bytes(OSThread::thread_id_offset()), T_LONG), id);
|
||||
__ convert(Bytecodes::_l2i, id, rlock_result(x));
|
||||
} else if (thread_id_size == (size_t) BytesPerInt) {
|
||||
__ move(new LIR_Address(osthread, in_bytes(OSThread::thread_id_offset()), T_INT), rlock_result(x));
|
||||
} else {
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
}
|
||||
|
||||
void LIRGenerator::do_ClassIDIntrinsic(Intrinsic* x) {
|
||||
CodeEmitInfo* info = state_for(x);
|
||||
CodeEmitInfo* info2 = new CodeEmitInfo(info); // Clone for the second null check
|
||||
BasicType klass_pointer_type = NOT_LP64(T_INT) LP64_ONLY(T_LONG);
|
||||
assert(info != NULL, "must have info");
|
||||
LIRItem arg(x->argument_at(1), this);
|
||||
arg.load_item();
|
||||
LIR_Opr klass = new_pointer_register();
|
||||
__ move(new LIR_Address(arg.result(), java_lang_Class::klass_offset_in_bytes(), klass_pointer_type), klass, info);
|
||||
LIR_Opr id = new_register(T_LONG);
|
||||
ByteSize offset = TRACE_ID_OFFSET;
|
||||
LIR_Address* trace_id_addr = new LIR_Address(klass, in_bytes(offset), T_LONG);
|
||||
__ move(trace_id_addr, id);
|
||||
__ logical_or(id, LIR_OprFact::longConst(0x01l), id);
|
||||
__ store(id, trace_id_addr);
|
||||
__ logical_and(id, LIR_OprFact::longConst(~0x3l), id);
|
||||
__ move(id, rlock_result(x));
|
||||
}
|
||||
#endif
|
||||
|
||||
void LIRGenerator::do_Intrinsic(Intrinsic* x) {
|
||||
switch (x->id()) {
|
||||
|
@ -3134,8 +3102,6 @@ void LIRGenerator::do_Intrinsic(Intrinsic* x) {
|
|||
}
|
||||
|
||||
#ifdef TRACE_HAVE_INTRINSICS
|
||||
case vmIntrinsics::_threadID: do_ThreadIDIntrinsic(x); break;
|
||||
case vmIntrinsics::_classID: do_ClassIDIntrinsic(x); break;
|
||||
case vmIntrinsics::_counterTime:
|
||||
do_RuntimeCall(CAST_FROM_FN_PTR(address, TRACE_TIME_METHOD), x);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue