// Default slow-path for fallback (calling the managed code to handle the intrinsic) in an // intrinsified call. This will copy the arguments into the positions for a regular call. // // Note: The actual parameters are required to be in the locations given by the invoke's location // summary. If an intrinsic modifies those locations before a slowpath call, they must be // restored! // // Note: If an invoke wasn't sharpened, we will put down an invoke-virtual here. That's potentially // sub-optimal (compared to a direct pointer call), but this is a slow-path.
// Copy the result back to the expected output.
Location out = invoke_->GetLocations()->Out(); if (out.IsValid()) {
DCHECK(out.IsRegisterKind()); // TODO: Replace this when we support output in memory.
DCHECK(!out.IsVecRegister()); // We have no ABI that returns values in vector registers. // We want to double-check that we don't overwrite a live register with the return // value. // Note: For the possible kNoOutputOverlap case we can't simply remove the OUT register // from the GetLiveRegisters() - theoretically it might be needed after the return from // the slow path. if (kIsDebugBuild) {
uint32_t live_registers =
invoke_->GetLocations()->GetLiveRegisters()->GetRegisterSet(out.GetRegisterType());
CHECK_EQ(live_registers & out.GetRegisterSet(), 0u);
}
codegen->MoveFromReturnRegister(out, invoke_->GetType());
}
staticinlinebool IsVarHandleGetAndBitwiseOp(HInvoke* invoke) { switch (invoke->GetIntrinsic()) { case Intrinsics::kVarHandleGetAndBitwiseOr: case Intrinsics::kVarHandleGetAndBitwiseOrAcquire: case Intrinsics::kVarHandleGetAndBitwiseOrRelease: case Intrinsics::kVarHandleGetAndBitwiseXor: case Intrinsics::kVarHandleGetAndBitwiseXorAcquire: case Intrinsics::kVarHandleGetAndBitwiseXorRelease: case Intrinsics::kVarHandleGetAndBitwiseAnd: case Intrinsics::kVarHandleGetAndBitwiseAndAcquire: case Intrinsics::kVarHandleGetAndBitwiseAndRelease: returntrue; default: returnfalse;
}
}
staticinlinebool IsVarHandleGetAndAdd(HInvoke* invoke) { switch (invoke->GetIntrinsic()) { case Intrinsics::kVarHandleGetAndAdd: case Intrinsics::kVarHandleGetAndAddAcquire: case Intrinsics::kVarHandleGetAndAddRelease: returntrue; default: returnfalse;
}
}
staticinlinebool IsUnsafeGetReference(HInvoke* invoke) { switch (invoke->GetIntrinsic()) { case Intrinsics::kUnsafeGetObject: case Intrinsics::kUnsafeGetObjectVolatile: case Intrinsics::kJdkUnsafeGetReference: case Intrinsics::kJdkUnsafeGetReferenceVolatile: case Intrinsics::kJdkUnsafeGetReferenceAcquire: returntrue; default: returnfalse;
}
}
staticinlinebool IsUnsafeCASReference(HInvoke* invoke) { switch (invoke->GetIntrinsic()) { case Intrinsics::kUnsafeCASObject: case Intrinsics::kJdkUnsafeCompareAndSetReference: returntrue; default: returnfalse;
}
}
staticinlinebool IsUnsafeGetAndSetReference(HInvoke* invoke) { switch (invoke->GetIntrinsic()) { case Intrinsics::kUnsafeGetAndSetObject: case Intrinsics::kJdkUnsafeGetAndSetReference: returntrue; default: returnfalse;
}
}
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.