From cd260ebf53e0e05bd75c37c4139f32782eb4ad97 Mon Sep 17 00:00:00 2001 From: Orion Hodson Date: Wed, 6 Jun 2018 09:04:17 +0100 Subject: ART: Simplify invoke-polymorphic entrypoints Moves to pattern used by the interpreter bridge and writes the result in both the regular return register and the floating point result register. Add return value tests to 956-method-handles. Test: art/test.py --host -r -t 956 Test: art/test.py --target --32 -r -t 956 Test: art/test.py --target --64 -r -t 956 Change-Id: I7389d04b70b88e149682f6d656ab185e48bcbf66 --- compiler/optimizing/code_generator.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'compiler/optimizing/code_generator.cc') diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index 4791fa3fba..9f2346db3c 100644 --- a/compiler/optimizing/code_generator.cc +++ b/compiler/optimizing/code_generator.cc @@ -516,7 +516,7 @@ void CodeGenerator::CreateCommonInvokeLocationSummary( locations->AddTemp(visitor->GetMethodLocation()); break; } - } else { + } else if (!invoke->IsInvokePolymorphic()) { locations->AddTemp(visitor->GetMethodLocation()); } } @@ -579,7 +579,9 @@ void CodeGenerator::GenerateInvokeUnresolvedRuntimeCall(HInvokeUnresolved* invok } void CodeGenerator::GenerateInvokePolymorphicCall(HInvokePolymorphic* invoke) { - MoveConstant(invoke->GetLocations()->GetTemp(0), static_cast(invoke->GetType())); + // invoke-polymorphic does not use a temporary to convey any additional information (e.g. a + // method index) since it requires multiple info from the instruction (registers A, B, H). Not + // using the reservation has no effect on the registers used in the runtime call. QuickEntrypointEnum entrypoint = kQuickInvokePolymorphic; InvokeRuntime(entrypoint, invoke, invoke->GetDexPc(), nullptr); } -- cgit v1.2.3-59-g8ed1b