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

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

Issue 2685583003: [wasm] Do not use setjmp/longjmp in cctests. (Closed)
Patch Set: Change comments Created 3 years, 10 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/compiler/arm/code-generator-arm.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 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 #if V8_TARGET_ARCH_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/division-by-constant.h" 8 #include "src/base/division-by-constant.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 2651 matching lines...) Expand 10 before | Expand all | Expand 10 after
2662 Mov(code_reg, Operand(CodeObject())); 2662 Mov(code_reg, Operand(CodeObject()));
2663 Push(code_reg); 2663 Push(code_reg);
2664 Add(fp, jssp, InternalFrameConstants::kFixedFrameSizeFromFp); 2664 Add(fp, jssp, InternalFrameConstants::kFixedFrameSizeFromFp);
2665 // jssp[4] : lr 2665 // jssp[4] : lr
2666 // jssp[3] : fp 2666 // jssp[3] : fp
2667 // jssp[1] : type 2667 // jssp[1] : type
2668 // jssp[0] : [code object] 2668 // jssp[0] : [code object]
2669 } else if (type == StackFrame::WASM_COMPILED) { 2669 } else if (type == StackFrame::WASM_COMPILED) {
2670 DCHECK(csp.Is(StackPointer())); 2670 DCHECK(csp.Is(StackPointer()));
2671 Mov(type_reg, Smi::FromInt(type)); 2671 Mov(type_reg, Smi::FromInt(type));
2672 Push(xzr, lr); 2672 Push(lr, fp);
2673 Push(fp, type_reg); 2673 Mov(fp, csp);
2674 Add(fp, csp, TypedFrameConstants::kFixedFrameSizeFromFp); 2674 Push(type_reg, xzr);
2675 // csp[3] for alignment 2675 // csp[3] : lr
2676 // csp[2] : lr 2676 // csp[2] : fp
2677 // csp[1] : fp 2677 // csp[1] : type
2678 // csp[0] : type 2678 // csp[0] : for alignment
2679 } else { 2679 } else {
2680 DCHECK(jssp.Is(StackPointer())); 2680 DCHECK(jssp.Is(StackPointer()));
2681 Mov(type_reg, Smi::FromInt(type)); 2681 Mov(type_reg, Smi::FromInt(type));
2682 Push(lr, fp); 2682 Push(lr, fp);
2683 Push(type_reg); 2683 Push(type_reg);
2684 Add(fp, jssp, TypedFrameConstants::kFixedFrameSizeFromFp); 2684 Add(fp, jssp, TypedFrameConstants::kFixedFrameSizeFromFp);
2685 // jssp[2] : lr 2685 // jssp[2] : lr
2686 // jssp[1] : fp 2686 // jssp[1] : fp
2687 // jssp[0] : type 2687 // jssp[0] : type
2688 } 2688 }
2689 } 2689 }
2690 2690
2691 2691
2692 void MacroAssembler::LeaveFrame(StackFrame::Type type) { 2692 void MacroAssembler::LeaveFrame(StackFrame::Type type) {
2693 DCHECK(jssp.Is(StackPointer())); 2693 if (type == StackFrame::WASM_COMPILED) {
2694 // Drop the execution stack down to the frame pointer and restore 2694 DCHECK(csp.Is(StackPointer()));
2695 // the caller frame pointer and return address. 2695 Mov(csp, fp);
2696 Mov(jssp, fp); 2696 AssertStackConsistency();
2697 AssertStackConsistency(); 2697 Pop(fp, lr);
2698 Pop(fp, lr); 2698 } else {
2699 DCHECK(jssp.Is(StackPointer()));
2700 // Drop the execution stack down to the frame pointer and restore
2701 // the caller frame pointer and return address.
2702 Mov(jssp, fp);
2703 AssertStackConsistency();
2704 Pop(fp, lr);
2705 }
2699 } 2706 }
2700 2707
2701 2708
2702 void MacroAssembler::ExitFramePreserveFPRegs() { 2709 void MacroAssembler::ExitFramePreserveFPRegs() {
2703 PushCPURegList(kCallerSavedFP); 2710 PushCPURegList(kCallerSavedFP);
2704 } 2711 }
2705 2712
2706 2713
2707 void MacroAssembler::ExitFrameRestoreFPRegs() { 2714 void MacroAssembler::ExitFrameRestoreFPRegs() {
2708 // Read the registers from the stack without popping them. The stack pointer 2715 // Read the registers from the stack without popping them. The stack pointer
(...skipping 1969 matching lines...) Expand 10 before | Expand all | Expand 10 after
4678 } 4685 }
4679 4686
4680 4687
4681 #undef __ 4688 #undef __
4682 4689
4683 4690
4684 } // namespace internal 4691 } // namespace internal
4685 } // namespace v8 4692 } // namespace v8
4686 4693
4687 #endif // V8_TARGET_ARCH_ARM64 4694 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « no previous file | src/compiler/arm/code-generator-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698