summaryrefslogtreecommitdiff
path: root/compiler/optimizing
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-01-09 08:48:29 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2015-01-09 08:48:29 +0000
commitbdcedd301a0a417ca538b7bf7e684c60cb1dbda3 (patch)
treefe557008730c8eb19d27ccf7895899e098f4dd8e /compiler/optimizing
parentc9025c185462c9b8d61725a7399ccf2d8a433a6d (diff)
Don't overwrite a register input.
`addr` is a register input, which can survive the current instruction, therefore we can't overwrite it. Change-Id: I6eaa60e5f91c2b7b9b31673457d2a0d63474e587
Diffstat (limited to 'compiler/optimizing')
-rw-r--r--compiler/optimizing/code_generator_arm.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/optimizing/code_generator_arm.cc b/compiler/optimizing/code_generator_arm.cc
index 63f5f94e7e..d0a72bb42a 100644
--- a/compiler/optimizing/code_generator_arm.cc
+++ b/compiler/optimizing/code_generator_arm.cc
@@ -2596,7 +2596,8 @@ void InstructionCodeGeneratorARM::GenerateWideAtomicLoad(Register addr,
Register out_hi) {
if (offset != 0) {
__ LoadImmediate(out_lo, offset);
- __ add(addr, addr, ShifterOperand(out_lo));
+ __ add(IP, addr, ShifterOperand(out_lo));
+ addr = IP;
}
__ ldrexd(out_lo, out_hi, addr);
}
@@ -2610,7 +2611,8 @@ void InstructionCodeGeneratorARM::GenerateWideAtomicStore(Register addr,
Label fail;
if (offset != 0) {
__ LoadImmediate(temp1, offset);
- __ add(addr, addr, ShifterOperand(temp1));
+ __ add(IP, addr, ShifterOperand(temp1));
+ addr = IP;
}
__ Bind(&fail);
// We need a load followed by store. (The address used in a STREX instruction must