From d3e9c62976780e830da79ae32be4192dee196db2 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Wed, 5 Aug 2020 12:20:28 +0100 Subject: ARM: Allow FP args in core regs for @CriticalNative. If a float or double argument needs to be passed in core register to a @CriticalNative method due to soft-float native ABI, insert a fake call to Float.floatToRawIntBits() or Double.doubleToRawLongBits() to satisfy type checks in the compiler. We cannot do that for intrinsics that expect those inputs in actual FP registers, so we still prevent such intrinsics from using `kCallCriticalNative`. This should be irrelevant if an actual intrinsic implementation is emitted. There are currently two unimplemented intrinsics that are affected by the carve-out, namely MathRoundDouble and FP16ToHalf, and four intrinsics implemented only when ARMv8A is supported, namely MathRint, MathRoundFloat, MathCeil and MathFloor. Test: testrunner.py --target --32 -t 178-app-image-native-method Bug: 112189621 Change-Id: Id14ef4f49f8a0e6489f97dc9588c0e6a5c122632 --- compiler/optimizing/nodes.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'compiler/optimizing/nodes.cc') diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index 22e165767d..50cedd2502 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -2450,6 +2450,9 @@ HInstruction* HGraph::InlineInto(HGraph* outer_graph, HInvoke* invoke) { if (HasIrreducibleLoops()) { outer_graph->SetHasIrreducibleLoops(true); } + if (HasDirectCriticalNativeCall()) { + outer_graph->SetHasDirectCriticalNativeCall(true); + } if (HasTryCatch()) { outer_graph->SetHasTryCatch(true); } -- cgit v1.2.3-59-g8ed1b