summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_generator.cc
diff options
context:
space:
mode:
author Calin Juravle <calin@google.com> 2015-10-06 17:35:58 +0100
committer Calin Juravle <calin@google.com> 2015-10-06 17:35:58 +0100
commit580b609cd6cfef46108156457df42254d11e72a7 (patch)
tree64104e19b57cbb9df97c9349585cc4d1e9fdb3de /compiler/optimizing/code_generator.cc
parentb5c469357f8faf8fbaa05bc41d56903b300d0cd1 (diff)
Fix location summary for LoadClass
Don't request a register for the current method if we're gonna call the runtime. Change-Id: I9760d15108bd95efb2a34e6eacd84b60841781d7
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
-rw-r--r--compiler/optimizing/code_generator.cc3
1 files changed, 2 insertions, 1 deletions
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());
}
}