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

Side by Side Diff: src/compiler/frame.h

Issue 1369303002: Fix Frame::AlignSavedCalleeRegisterSlots (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_COMPILER_FRAME_H_ 5 #ifndef V8_COMPILER_FRAME_H_
6 #define V8_COMPILER_FRAME_H_ 6 #define V8_COMPILER_FRAME_H_
7 7
8 #include "src/bit-vector.h" 8 #include "src/bit-vector.h"
9 #include "src/frames.h" 9 #include "src/frames.h"
10 10
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 DCHECK(allocated_double_registers_ == NULL); 103 DCHECK(allocated_double_registers_ == NULL);
104 allocated_double_registers_ = regs; 104 allocated_double_registers_ = regs;
105 } 105 }
106 106
107 bool DidAllocateDoubleRegisters() { 107 bool DidAllocateDoubleRegisters() {
108 return !allocated_double_registers_->IsEmpty(); 108 return !allocated_double_registers_->IsEmpty();
109 } 109 }
110 110
111 int AlignSavedCalleeRegisterSlots() { 111 int AlignSavedCalleeRegisterSlots() {
112 DCHECK_EQ(0, spilled_callee_register_slot_count_); 112 DCHECK_EQ(0, spilled_callee_register_slot_count_);
113 int frame_slot_count_before = frame_slot_count_; 113 int delta = frame_slot_count_ & 1;
114 frame_slot_count_ = RoundUp(frame_slot_count_, 2); 114 frame_slot_count_ += delta;
115 return frame_slot_count_before - frame_slot_count_; 115 return delta;
116 } 116 }
117 117
118 void AllocateSavedCalleeRegisterSlots(int count) { 118 void AllocateSavedCalleeRegisterSlots(int count) {
119 frame_slot_count_ += count; 119 frame_slot_count_ += count;
120 spilled_callee_register_slot_count_ += count; 120 spilled_callee_register_slot_count_ += count;
121 } 121 }
122 122
123 int AllocateSpillSlot(int width) { 123 int AllocateSpillSlot(int width) {
124 DCHECK_EQ(0, spilled_callee_register_slot_count_); 124 DCHECK_EQ(0, spilled_callee_register_slot_count_);
125 int frame_slot_count_before = frame_slot_count_; 125 int frame_slot_count_before = frame_slot_count_;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 int offset_; // Encodes SP or FP in the low order bit. 182 int offset_; // Encodes SP or FP in the low order bit.
183 183
184 static const int kFromSp = 1; 184 static const int kFromSp = 1;
185 static const int kFromFp = 0; 185 static const int kFromFp = 0;
186 }; 186 };
187 } 187 }
188 } 188 }
189 } // namespace v8::internal::compiler 189 } // namespace v8::internal::compiler
190 190
191 #endif // V8_COMPILER_FRAME_H_ 191 #endif // V8_COMPILER_FRAME_H_
OLDNEW
« 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