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

Unified Diff: src/compiler/instruction-selector.cc

Issue 1811283003: [wasm] WIP fix arm64 frame alignment. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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 | « src/compiler/c-linkage.cc ('k') | src/compiler/linkage.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction-selector.cc
diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc
index 91900be25c30dabec502028de1401680631509ae..400dcd12d12267d13918d3df57da496230519e03 100644
--- a/src/compiler/instruction-selector.cc
+++ b/src/compiler/instruction-selector.cc
@@ -1543,13 +1543,15 @@ void InstructionSelector::VisitCall(Node* node, BasicBlock* handler) {
buffer.instruction_args.push_back(g.Label(handler));
}
- // (arm64 only) caller uses JSSP but callee might destroy it.
- if (descriptor->UseNativeStack() &&
- !linkage()->GetIncomingDescriptor()->UseNativeStack()) {
- flags |= CallDescriptor::kRestoreJSSP;
+ bool from_native_stack = linkage()->GetIncomingDescriptor()->UseNativeStack();
+ bool to_native_stack = descriptor->UseNativeStack();
+ if (from_native_stack != to_native_stack) {
+ // (arm64 only) Mismatch in the use of stack pointers. One or the other
+ // has to be restored manually by the code generator.
+ flags |= to_native_stack ? CallDescriptor::kRestoreJSSP
+ : CallDescriptor::kRestoreCSP;
}
-
// Select the appropriate opcode based on the call type.
InstructionCode opcode = kArchNop;
switch (descriptor->kind()) {
« no previous file with comments | « src/compiler/c-linkage.cc ('k') | src/compiler/linkage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698