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

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

Issue 389583003: Fix arm64 deoptimization of double registers (reverts r20613). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 | test/mjsunit/regress/regress-381313.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/deoptimizer-arm64.cc
diff --git a/src/arm64/deoptimizer-arm64.cc b/src/arm64/deoptimizer-arm64.cc
index 3451ef3c47306bad3ff4b84341612a1f95338ad2..712881d9db08f381145a6a9ef9912571eba6bb57 100644
--- a/src/arm64/deoptimizer-arm64.cc
+++ b/src/arm64/deoptimizer-arm64.cc
@@ -110,42 +110,6 @@ void Deoptimizer::CopyDoubleRegisters(FrameDescription* output_frame) {
}
-#define __ masm->
-
-static void CopyRegisterDumpToFrame(MacroAssembler* masm,
- Register frame,
- CPURegList reg_list,
- Register scratch1,
- Register scratch2,
- int src_offset,
- int dst_offset) {
- int offset0, offset1;
- CPURegList copy_to_input = reg_list;
- int reg_count = reg_list.Count();
- int reg_size = reg_list.RegisterSizeInBytes();
- for (int i = 0; i < (reg_count / 2); i++) {
- __ PeekPair(scratch1, scratch2, src_offset + (i * reg_size * 2));
-
- offset0 = (copy_to_input.PopLowestIndex().code() * reg_size) + dst_offset;
- offset1 = (copy_to_input.PopLowestIndex().code() * reg_size) + dst_offset;
-
- if ((offset0 + reg_size) == offset1) {
- // Registers are adjacent: store in pairs.
- __ Stp(scratch1, scratch2, MemOperand(frame, offset0));
- } else {
- // Registers are not adjacent: store individually.
- __ Str(scratch1, MemOperand(frame, offset0));
- __ Str(scratch2, MemOperand(frame, offset1));
- }
- }
- if ((reg_count & 1) != 0) {
- __ Peek(scratch1, src_offset + (reg_count - 1) * reg_size);
- offset0 = (copy_to_input.PopLowestIndex().code() * reg_size) + dst_offset;
- __ Str(scratch1, MemOperand(frame, offset0));
- }
-}
-
-#undef __
#define __ masm()->
@@ -209,13 +173,23 @@ void Deoptimizer::EntryGenerator::Generate() {
__ Ldr(x1, MemOperand(deoptimizer, Deoptimizer::input_offset()));
// Copy core registers into the input frame.
- CopyRegisterDumpToFrame(masm(), x1, saved_registers, x2, x4, 0,
- FrameDescription::registers_offset());
+ CPURegList copy_to_input = saved_registers;
+ for (int i = 0; i < saved_registers.Count(); i++) {
+ __ Peek(x2, i * kPointerSize);
+ CPURegister current_reg = copy_to_input.PopLowestIndex();
+ int offset = (current_reg.code() * kPointerSize) +
+ FrameDescription::registers_offset();
+ __ Str(x2, MemOperand(x1, offset));
+ }
// Copy FP registers to the input frame.
- CopyRegisterDumpToFrame(masm(), x1, saved_fp_registers, x2, x4,
- kFPRegistersOffset,
- FrameDescription::double_registers_offset());
+ for (int i = 0; i < saved_fp_registers.Count(); i++) {
+ int dst_offset = FrameDescription::double_registers_offset() +
+ (i * kDoubleSize);
+ int src_offset = kFPRegistersOffset + (i * kDoubleSize);
+ __ Peek(x2, src_offset);
+ __ Str(x2, MemOperand(x1, dst_offset));
+ }
// Remove the bailout id and the saved registers from the stack.
__ Drop(1 + (kSavedRegistersAreaSize / kXRegSize));
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-381313.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698