ARM64: toFloat() intrinsics with ARMv8 FP16.
This CL intrinsifies toFloat() method with ARMv8.2 FP16 instructions.
This CL depends on the android framework and libcore changes:
moving FP16 implementations into libcore.
Tested with local micro benchmark on Pixel 3, compared to original
android.util.Half.toFloat() Java implementation, this intrinsic is
50% faster.
In real-life case, the FP16 toFloat() intrinsic can help
accelerate ColorLong ARGB decoding in Android framework.
This intrinsic implementation archieves bit-level compatibility with the
original Java implementation android.util.Half.toFloat().
Test: 580-fp16
Test: art/test/testrunner/run_build_test_target.py -j80 art-test-javac
Test: test-art-host, test-art-target
Change-Id: I059c69747067b84f2c532465e32a1dcd3c25269f
diff --git a/runtime/hidden_api.h b/runtime/hidden_api.h
index 9d7c646..a21225b 100644
--- a/runtime/hidden_api.h
+++ b/runtime/hidden_api.h
@@ -357,6 +357,7 @@
case Intrinsics::kVarHandleWeakCompareAndSetRelease:
return 0u;
case Intrinsics::kUnsafeGetLong:
+ case Intrinsics::kFP16ToFloat:
return kAccCorePlatformApi;
default:
// Remaining intrinsics are public API. We DCHECK that in SetIntrinsic().