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

Side by Side Diff: src/mips/lithium-codegen-mips.cc

Issue 996883002: MIPS: CpuProfiler: fix for CollectDeoptEvents test. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove cctest.status from fix. Created 5 years, 9 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 2012 the V8 project authors. All rights reserved.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 Address entry = table_entry->address; 340 Address entry = table_entry->address;
341 DeoptComment(table_entry->deopt_info); 341 DeoptComment(table_entry->deopt_info);
342 342
343 // Second-level deopt table entries are contiguous and small, so instead 343 // Second-level deopt table entries are contiguous and small, so instead
344 // of loading the full, absolute address of each one, load an immediate 344 // of loading the full, absolute address of each one, load an immediate
345 // offset which will be added to the base address later. 345 // offset which will be added to the base address later.
346 __ li(entry_offset, Operand(entry - base)); 346 __ li(entry_offset, Operand(entry - base));
347 347
348 if (table_entry->needs_frame) { 348 if (table_entry->needs_frame) {
349 DCHECK(!info()->saves_caller_doubles()); 349 DCHECK(!info()->saves_caller_doubles());
350 if (needs_frame.is_bound()) { 350 Comment(";;; call deopt with frame");
351 __ Branch(&needs_frame); 351 __ MultiPush(cp.bit() | fp.bit() | ra.bit());
352 } else { 352 __ Call(&needs_frame);
353 __ bind(&needs_frame);
354 Comment(";;; call deopt with frame");
355 __ MultiPush(cp.bit() | fp.bit() | ra.bit());
356 // This variant of deopt can only be used with stubs. Since we don't
357 // have a function pointer to install in the stack frame that we're
358 // building, install a special marker there instead.
359 DCHECK(info()->IsStub());
360 __ li(at, Operand(Smi::FromInt(StackFrame::STUB)));
361 __ push(at);
362 __ Addu(fp, sp,
363 Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
364 __ bind(&call_deopt_entry);
365 // Add the base address to the offset previously loaded in
366 // entry_offset.
367 __ Addu(entry_offset, entry_offset,
368 Operand(ExternalReference::ForDeoptEntry(base)));
369 __ Call(entry_offset);
370 }
371 } else { 353 } else {
372 // The last entry can fall through into `call_deopt_entry`, avoiding a 354 __ Call(&call_deopt_entry);
373 // branch.
374 bool need_branch = ((i + 1) != length) || call_deopt_entry.is_bound();
375
376 if (need_branch) __ Branch(&call_deopt_entry);
377 } 355 }
378 } 356 }
379 357
380 if (!call_deopt_entry.is_bound()) { 358 if (needs_frame.is_linked()) {
381 Comment(";;; call deopt"); 359 __ bind(&needs_frame);
382 __ bind(&call_deopt_entry); 360 // This variant of deopt can only be used with stubs. Since we don't
361 // have a function pointer to install in the stack frame that we're
362 // building, install a special marker there instead.
363 DCHECK(info()->IsStub());
364 __ li(at, Operand(Smi::FromInt(StackFrame::STUB)));
365 __ push(at);
366 __ Addu(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
367 }
383 368
384 if (info()->saves_caller_doubles()) { 369 Comment(";;; call deopt");
385 DCHECK(info()->IsStub()); 370 __ bind(&call_deopt_entry);
386 RestoreCallerDoubles();
387 }
388 371
389 // Add the base address to the offset previously loaded in entry_offset. 372 if (info()->saves_caller_doubles()) {
390 __ Addu(entry_offset, entry_offset, 373 DCHECK(info()->IsStub());
391 Operand(ExternalReference::ForDeoptEntry(base))); 374 RestoreCallerDoubles();
392 __ Call(entry_offset);
393 } 375 }
376
377 // Add the base address to the offset previously loaded in entry_offset.
378 __ Addu(entry_offset, entry_offset,
379 Operand(ExternalReference::ForDeoptEntry(base)));
380 __ Jump(entry_offset);
394 } 381 }
395 __ RecordComment("]"); 382 __ RecordComment("]");
396 383
397 // The deoptimization jump table is the last part of the instruction 384 // The deoptimization jump table is the last part of the instruction
398 // sequence. Mark the generated code as done unless we bailed out. 385 // sequence. Mark the generated code as done unless we bailed out.
399 if (!is_aborted()) status_ = DONE; 386 if (!is_aborted()) status_ = DONE;
400 return !is_aborted(); 387 return !is_aborted();
401 } 388 }
402 389
403 390
(...skipping 5631 matching lines...) Expand 10 before | Expand all | Expand 10 after
6035 __ li(at, scope_info); 6022 __ li(at, scope_info);
6036 __ Push(at, ToRegister(instr->function())); 6023 __ Push(at, ToRegister(instr->function()));
6037 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6024 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6038 RecordSafepoint(Safepoint::kNoLazyDeopt); 6025 RecordSafepoint(Safepoint::kNoLazyDeopt);
6039 } 6026 }
6040 6027
6041 6028
6042 #undef __ 6029 #undef __
6043 6030
6044 } } // namespace v8::internal 6031 } } // namespace v8::internal
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