summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/code_generator.cc
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2014-05-02 11:03:30 +0100
committerNicolas Geoffray <ngeoffray@google.com>2014-05-02 11:06:50 +0100
commitf529d776ca9f48b115714f6c79677755ecc37d24 (patch)
tree707d3f8478a0500dc6e32cfa61d5ebcc6acca596 /compiler/optimizing/code_generator.cc
parent608168b380b741e2c7e1a2b0b568c0738986166b (diff)
downloadart-f529d776ca9f48b115714f6c79677755ecc37d24.zip
art-f529d776ca9f48b115714f6c79677755ecc37d24.tar.gz
art-f529d776ca9f48b115714f6c79677755ecc37d24.tar.bz2
Make all registers available when allocating an output register.
On ARM we currently only have two register pairs available, so we need to use one already used for an input. Change-Id: I5411862310009a41e50ddab3549d3a9e9052266a
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
-rw-r--r--compiler/optimizing/code_generator.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc
index ff316e5..8b85d71 100644
--- a/compiler/optimizing/code_generator.cc
+++ b/compiler/optimizing/code_generator.cc
@@ -132,6 +132,12 @@ void CodeGenerator::AllocateRegistersLocally(HInstruction* instruction) const {
}
}
+ // Make all registers available for the return value.
+ for (size_t i = 0, e = GetNumberOfRegisters(); i < e; ++i) {
+ blocked_registers_[i] = false;
+ }
+ SetupBlockedRegisters(blocked_registers_);
+
Location result_location = locations->Out();
if (result_location.IsUnallocated()) {
switch (result_location.GetPolicy()) {