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

Side by Side Diff: src/x87/debug-x87.cc

Issue 1227603002: X87: Debugger: use debug break slots instead of ICs (except for calls). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/x87/full-codegen-x87.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X87 7 #if V8_TARGET_ARCH_X87
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/debug.h" 10 #include "src/debug.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // Register state for CallICStub 171 // Register state for CallICStub
172 // ----------- S t a t e ------------- 172 // ----------- S t a t e -------------
173 // -- edx : type feedback slot (smi) 173 // -- edx : type feedback slot (smi)
174 // -- edi : function 174 // -- edi : function
175 // ----------------------------------- 175 // -----------------------------------
176 Generate_DebugBreakCallHelper(masm, edx.bit() | edi.bit(), 176 Generate_DebugBreakCallHelper(masm, edx.bit() | edi.bit(),
177 0, false); 177 0, false);
178 } 178 }
179 179
180 180
181 void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) {
182 // Register state for IC load call (from ic-x87.cc).
183 Register receiver = LoadDescriptor::ReceiverRegister();
184 Register name = LoadDescriptor::NameRegister();
185 Register slot = LoadDescriptor::SlotRegister();
186 RegList regs = receiver.bit() | name.bit() | slot.bit();
187 Generate_DebugBreakCallHelper(masm, regs, 0, false);
188 }
189
190
191 void DebugCodegen::GenerateStoreICDebugBreak(MacroAssembler* masm) {
192 // Register state for IC store call (from ic-x87.cc).
193 Register receiver = StoreDescriptor::ReceiverRegister();
194 Register name = StoreDescriptor::NameRegister();
195 Register value = StoreDescriptor::ValueRegister();
196 RegList regs = receiver.bit() | name.bit() | value.bit();
197 if (FLAG_vector_stores) {
198 regs |= VectorStoreICDescriptor::SlotRegister().bit();
199 }
200 Generate_DebugBreakCallHelper(masm, regs, 0, false);
201 }
202
203
204 void DebugCodegen::GenerateKeyedLoadICDebugBreak(MacroAssembler* masm) {
205 // Register state for keyed IC load call (from ic-x87.cc).
206 GenerateLoadICDebugBreak(masm);
207 }
208
209
210 void DebugCodegen::GenerateKeyedStoreICDebugBreak(MacroAssembler* masm) {
211 // Register state for keyed IC store call (from ic-x87.cc).
212 GenerateStoreICDebugBreak(masm);
213 }
214
215
216 void DebugCodegen::GenerateCompareNilICDebugBreak(MacroAssembler* masm) {
217 // Register state for CompareNil IC
218 // ----------- S t a t e -------------
219 // -- eax : value
220 // -----------------------------------
221 Generate_DebugBreakCallHelper(masm, eax.bit(), 0, false);
222 }
223
224
225 void DebugCodegen::GenerateReturnDebugBreak(MacroAssembler* masm) { 181 void DebugCodegen::GenerateReturnDebugBreak(MacroAssembler* masm) {
226 // Register state just before return from JS function (from codegen-x87.cc). 182 // Register state just before return from JS function (from codegen-x87.cc).
227 // ----------- S t a t e ------------- 183 // ----------- S t a t e -------------
228 // -- eax: return value 184 // -- eax: return value
229 // ----------------------------------- 185 // -----------------------------------
230 Generate_DebugBreakCallHelper(masm, eax.bit(), 0, true); 186 Generate_DebugBreakCallHelper(masm, eax.bit(), 0, true);
231 } 187 }
232 188
233 189
234 void DebugCodegen::GenerateCallFunctionStubDebugBreak(MacroAssembler* masm) { 190 void DebugCodegen::GenerateCallFunctionStubDebugBreak(MacroAssembler* masm) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 Label check_codesize; 231 Label check_codesize;
276 __ bind(&check_codesize); 232 __ bind(&check_codesize);
277 __ RecordDebugBreakSlot(); 233 __ RecordDebugBreakSlot();
278 __ Nop(Assembler::kDebugBreakSlotLength); 234 __ Nop(Assembler::kDebugBreakSlotLength);
279 DCHECK_EQ(Assembler::kDebugBreakSlotLength, 235 DCHECK_EQ(Assembler::kDebugBreakSlotLength,
280 masm->SizeOfCodeGeneratedSince(&check_codesize)); 236 masm->SizeOfCodeGeneratedSince(&check_codesize));
281 } 237 }
282 238
283 239
284 void DebugCodegen::GenerateSlotDebugBreak(MacroAssembler* masm) { 240 void DebugCodegen::GenerateSlotDebugBreak(MacroAssembler* masm) {
285 // In the places where a debug break slot is inserted no registers can contain
286 // object pointers.
287 Generate_DebugBreakCallHelper(masm, 0, 0, true); 241 Generate_DebugBreakCallHelper(masm, 0, 0, true);
288 } 242 }
289 243
290 244
291 void DebugCodegen::GeneratePlainReturnLiveEdit(MacroAssembler* masm) { 245 void DebugCodegen::GeneratePlainReturnLiveEdit(MacroAssembler* masm) {
292 masm->ret(0); 246 masm->ret(0);
293 } 247 }
294 248
295 249
296 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { 250 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) {
(...skipping 22 matching lines...) Expand all
319 273
320 274
321 const bool LiveEdit::kFrameDropperSupported = true; 275 const bool LiveEdit::kFrameDropperSupported = true;
322 276
323 #undef __ 277 #undef __
324 278
325 } // namespace internal 279 } // namespace internal
326 } // namespace v8 280 } // namespace v8
327 281
328 #endif // V8_TARGET_ARCH_X87 282 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | src/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698