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

Side by Side Diff: src/arm64/macro-assembler-arm64.cc

Issue 308083006: Don't push eax/rax before calling Runtime_Abort (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « src/arm64/macro-assembler-arm64.h ('k') | src/ia32/macro-assembler-ia32.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 "v8.h" 5 #include "v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM64 7 #if V8_TARGET_ARCH_ARM64
8 8
9 #include "bootstrapper.h" 9 #include "bootstrapper.h"
10 #include "codegen.h" 10 #include "codegen.h"
(...skipping 1531 matching lines...) Expand 10 before | Expand all | Expand 10 after
1542 // Get the code object and state. Clear the context and frame pointer (0 was 1542 // Get the code object and state. Clear the context and frame pointer (0 was
1543 // saved in the handler). 1543 // saved in the handler).
1544 Register object = scratch1; 1544 Register object = scratch1;
1545 Register state = scratch2; 1545 Register state = scratch2;
1546 Pop(object, state, cp, fp); 1546 Pop(object, state, cp, fp);
1547 1547
1548 JumpToHandlerEntry(value, object, state, scratch3, scratch4); 1548 JumpToHandlerEntry(value, object, state, scratch3, scratch4);
1549 } 1549 }
1550 1550
1551 1551
1552 void MacroAssembler::Throw(BailoutReason reason) {
1553 Label throw_start;
1554 Bind(&throw_start);
1555 #ifdef DEBUG
1556 const char* msg = GetBailoutReason(reason);
1557 RecordComment("Throw message: ");
1558 RecordComment((msg != NULL) ? msg : "UNKNOWN");
1559 #endif
1560
1561 Mov(x0, Smi::FromInt(reason));
1562 Push(x0);
1563
1564 // Disable stub call restrictions to always allow calls to throw.
1565 if (!has_frame_) {
1566 // We don't actually want to generate a pile of code for this, so just
1567 // claim there is a stack frame, without generating one.
1568 FrameScope scope(this, StackFrame::NONE);
1569 CallRuntime(Runtime::kHiddenThrowMessage, 1);
1570 } else {
1571 CallRuntime(Runtime::kHiddenThrowMessage, 1);
1572 }
1573 // ThrowMessage should not return here.
1574 Unreachable();
1575 }
1576
1577
1578 void MacroAssembler::ThrowIf(Condition cond, BailoutReason reason) {
1579 Label ok;
1580 B(InvertCondition(cond), &ok);
1581 Throw(reason);
1582 Bind(&ok);
1583 }
1584
1585
1586 void MacroAssembler::ThrowIfSmi(const Register& value, BailoutReason reason) {
1587 Label ok;
1588 JumpIfNotSmi(value, &ok);
1589 Throw(reason);
1590 Bind(&ok);
1591 }
1592
1593
1594 void MacroAssembler::SmiAbs(const Register& smi, Label* slow) { 1552 void MacroAssembler::SmiAbs(const Register& smi, Label* slow) {
1595 ASSERT(smi.Is64Bits()); 1553 ASSERT(smi.Is64Bits());
1596 Abs(smi, smi, slow); 1554 Abs(smi, smi, slow);
1597 } 1555 }
1598 1556
1599 1557
1600 void MacroAssembler::AssertSmi(Register object, BailoutReason reason) { 1558 void MacroAssembler::AssertSmi(Register object, BailoutReason reason) {
1601 if (emit_debug_code()) { 1559 if (emit_debug_code()) {
1602 STATIC_ASSERT(kSmiTag == 0); 1560 STATIC_ASSERT(kSmiTag == 0);
1603 Tst(object, kSmiTagMask); 1561 Tst(object, kSmiTagMask);
(...skipping 3653 matching lines...) Expand 10 before | Expand all | Expand 10 after
5257 } 5215 }
5258 } 5216 }
5259 5217
5260 5218
5261 #undef __ 5219 #undef __
5262 5220
5263 5221
5264 } } // namespace v8::internal 5222 } } // namespace v8::internal
5265 5223
5266 #endif // V8_TARGET_ARCH_ARM64 5224 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/macro-assembler-arm64.h ('k') | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698