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..11f07d56a9954d2fe5b8b16ec0e1f5e797646aa3 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); |
Rodolph Perfetta (ARM)
2017/02/08 01:40:55
no need for __ as you are in the macro assembler.
ahaas
2017/02/08 09:11:46
Done.
|
+ __ 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); |
Rodolph Perfetta (ARM)
2017/02/08 01:40:55
ditto.
ahaas
2017/02/08 09:11:46
Done.
|
+ 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); |
+ } |
} |