From 580b609cd6cfef46108156457df42254d11e72a7 Mon Sep 17 00:00:00 2001 From: Calin Juravle Date: Tue, 6 Oct 2015 17:35:58 +0100 Subject: Fix location summary for LoadClass Don't request a register for the current method if we're gonna call the runtime. Change-Id: I9760d15108bd95efb2a34e6eacd84b60841781d7 --- compiler/optimizing/code_generator.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler/optimizing/code_generator.cc') diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index 00f316cf98..1da2a07462 100644 --- a/compiler/optimizing/code_generator.cc +++ b/compiler/optimizing/code_generator.cc @@ -547,11 +547,12 @@ void CodeGenerator::CreateLoadClassLocationSummary(HLoadClass* cls, ? LocationSummary::kCallOnSlowPath : LocationSummary::kNoCall); LocationSummary* locations = new (allocator) LocationSummary(cls, call_kind); - locations->SetInAt(0, Location::RequiresRegister()); if (cls->NeedsAccessCheck()) { + locations->SetInAt(0, Location::NoLocation()); locations->AddTemp(runtime_type_index_location); locations->SetOut(runtime_return_location); } else { + locations->SetInAt(0, Location::RequiresRegister()); locations->SetOut(Location::RequiresRegister()); } } -- cgit v1.2.3-59-g8ed1b