Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Unified Diff: src/arm/deoptimizer-arm.cc

Issue 6962010: ARM: Avoid using ldrd/strd with post increment (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/deoptimizer-arm.cc
diff --git a/src/arm/deoptimizer-arm.cc b/src/arm/deoptimizer-arm.cc
index 0298b0d1788d5289f20ee7deed58d5f479a42f9d..e0e84ab337db610ba0eeb97119073bc2f956c81e 100644
--- a/src/arm/deoptimizer-arm.cc
+++ b/src/arm/deoptimizer-arm.cc
@@ -611,30 +611,21 @@ void Deoptimizer::EntryGenerator::Generate() {
// Copy core registers into FrameDescription::registers_[kNumRegisters].
ASSERT(Register::kNumRegisters == kNumberOfRegisters);
- ASSERT(kNumberOfRegisters % 2 == 0);
-
- Label arm_loop;
- __ add(r6, r1, Operand(FrameDescription::registers_offset()));
- __ mov(r5, Operand(sp));
- __ mov(r4, Operand(kNumberOfRegisters / 2));
-
- __ bind(&arm_loop);
- __ Ldrd(r2, r3, MemOperand(r5, kPointerSize * 2, PostIndex));
- __ sub(r4, r4, Operand(1), SetCC);
- __ Strd(r2, r3, MemOperand(r6, kPointerSize * 2, PostIndex));
- __ b(gt, &arm_loop);
+ for (int i = 0; i < kNumberOfRegisters; i++) {
+ int offset = (i * kPointerSize) + FrameDescription::registers_offset();
+ __ ldr(r2, MemOperand(sp, i * kPointerSize));
+ __ str(r2, MemOperand(r1, offset));
+ }
// Copy VFP registers to
// double_registers_[DoubleRegister::kNumAllocatableRegisters]
- Label vfp_loop;
- __ add(r6, r1, Operand(FrameDescription::double_registers_offset()));
- __ mov(r4, Operand(DwVfpRegister::kNumAllocatableRegisters));
-
- __ bind(&vfp_loop);
- __ Ldrd(r2, r3, MemOperand(r5, kDoubleSize, PostIndex));
- __ sub(r4, r4, Operand(1), SetCC);
- __ Strd(r2, r3, MemOperand(r6, kDoubleSize, PostIndex));
- __ b(gt, &vfp_loop);
+ int double_regs_offset = FrameDescription::double_registers_offset();
+ for (int i = 0; i < DwVfpRegister::kNumAllocatableRegisters; ++i) {
+ int dst_offset = i * kDoubleSize + double_regs_offset;
+ int src_offset = i * kDoubleSize + kNumberOfRegisters * kPointerSize;
+ __ vldr(d0, sp, src_offset);
+ __ vstr(d0, r1, dst_offset);
+ }
// Remove the bailout id, eventually return address, and the saved registers
// from the stack.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698