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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/arm/code-generator-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/macro-assembler-arm64.cc
diff --git a/src/arm64/macro-assembler-arm64.cc b/src/arm64/macro-assembler-arm64.cc
index 8a42f8e7676e90896df0b14a51572137ee521674..ca48fa0c21b0fabe9d5e3d8eb0023f39b1b6eec1 100644
--- a/src/arm64/macro-assembler-arm64.cc
+++ b/src/arm64/macro-assembler-arm64.cc
@@ -2669,13 +2669,13 @@ void MacroAssembler::EnterFrame(StackFrame::Type type) {
} else if (type == StackFrame::WASM_COMPILED) {
DCHECK(csp.Is(StackPointer()));
Mov(type_reg, Smi::FromInt(type));
- Push(xzr, lr);
- Push(fp, type_reg);
- Add(fp, csp, TypedFrameConstants::kFixedFrameSizeFromFp);
- // csp[3] for alignment
- // csp[2] : lr
- // csp[1] : fp
- // csp[0] : type
+ Push(lr, fp);
+ Mov(fp, csp);
+ Push(type_reg, xzr);
+ // csp[3] : lr
+ // csp[2] : fp
+ // csp[1] : type
+ // csp[0] : for alignment
} else {
DCHECK(jssp.Is(StackPointer()));
Mov(type_reg, Smi::FromInt(type));
@@ -2690,12 +2690,19 @@ void MacroAssembler::EnterFrame(StackFrame::Type type) {
void MacroAssembler::LeaveFrame(StackFrame::Type type) {
- DCHECK(jssp.Is(StackPointer()));
- // Drop the execution stack down to the frame pointer and restore
- // the caller frame pointer and return address.
- Mov(jssp, fp);
- AssertStackConsistency();
- Pop(fp, lr);
+ if (type == StackFrame::WASM_COMPILED) {
+ DCHECK(csp.Is(StackPointer()));
+ Mov(csp, fp);
+ AssertStackConsistency();
+ Pop(fp, lr);
+ } else {
+ DCHECK(jssp.Is(StackPointer()));
+ // Drop the execution stack down to the frame pointer and restore
+ // the caller frame pointer and return address.
+ Mov(jssp, fp);
+ AssertStackConsistency();
+ Pop(fp, lr);
+ }
}
« 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