Integer.divideUnsigned() intrinsic on ARM64.
Implements the intrinsic for arm64; adds a comment
for a DCHECK() that prevented kNoOutputOverlap usage
in intrinsics with slow paths.
Author: Vladimir Marko.
Committer: Artem Serov.
Test: Covered by 082-inline-execute.
Test: testrunner.py --target --optimizing --64
Bug: 156736938
Change-Id: Ie1e61c19afe6a899fd4152206e5dbf9ad013e602
diff --git a/compiler/optimizing/intrinsics_utils.h b/compiler/optimizing/intrinsics_utils.h
index 8c9dd14..b4ef5dd 100644
--- a/compiler/optimizing/intrinsics_utils.h
+++ b/compiler/optimizing/intrinsics_utils.h
@@ -78,6 +78,11 @@
Location out = invoke_->GetLocations()->Out();
if (out.IsValid()) {
DCHECK(out.IsRegisterKind()); // TODO: Replace this when we support output in memory.
+ // 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.
DCHECK(!invoke_->GetLocations()->GetLiveRegisters()->OverlapsRegisters(out));
codegen->MoveFromReturnRegister(out, invoke_->GetType());
}