Chromium Code Reviews| Index: src/compiler/instruction-selector.cc |
| diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc |
| index 91900be25c30dabec502028de1401680631509ae..931718174d88dace423d44c9e4d9544fdef003e2 100644 |
| --- a/src/compiler/instruction-selector.cc |
| +++ b/src/compiler/instruction-selector.cc |
| @@ -1544,9 +1544,14 @@ void InstructionSelector::VisitCall(Node* node, BasicBlock* handler) { |
| } |
| // (arm64 only) caller uses JSSP but callee might destroy it. |
| - if (descriptor->UseNativeStack() && |
| - !linkage()->GetIncomingDescriptor()->UseNativeStack()) { |
| - flags |= CallDescriptor::kRestoreJSSP; |
| + bool caller_native_stack = |
|
ahaas
2016/03/29 08:33:58
Similar to the code in the instruction-selector-ar
titzer
2016/03/29 09:10:53
Done.
|
| + linkage()->GetIncomingDescriptor()->UseNativeStack(); |
| + bool to_native_stack = descriptor->UseNativeStack(); |
| + if (caller_native_stack != to_native_stack) { |
| + // Mismatch in the use of stack pointers. One or the other has to be |
| + // restored. |
| + flags |= to_native_stack ? CallDescriptor::kRestoreJSSP |
| + : CallDescriptor::kRestoreCSP; |
| } |