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

Unified Diff: src/compiler/arm64/code-generator-arm64.cc

Issue 1494123002: [turbofan, arm64] Fix native stack parameters on arm64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Minor changes according to comments. Created 5 years 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/arm64/macro-assembler-arm64.cc ('k') | src/compiler/arm64/instruction-selector-arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/arm64/code-generator-arm64.cc
diff --git a/src/compiler/arm64/code-generator-arm64.cc b/src/compiler/arm64/code-generator-arm64.cc
index 928b2c6dbb93dfd7658334eeed810a72a2d161cf..750874cea812769bd3dcf437bdff4d9212b3bda3 100644
--- a/src/compiler/arm64/code-generator-arm64.cc
+++ b/src/compiler/arm64/code-generator-arm64.cc
@@ -877,12 +877,22 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
}
case kArm64Poke: {
Operand operand(i.InputInt32(1) * kPointerSize);
- __ Poke(i.InputRegister(0), operand);
+ if (instr->InputAt(0)->IsDoubleRegister()) {
+ __ Poke(i.InputFloat64Register(0), operand);
+ } else {
+ __ Poke(i.InputRegister(0), operand);
+ }
break;
}
case kArm64PokePair: {
int slot = i.InputInt32(2) - 1;
- __ PokePair(i.InputRegister(1), i.InputRegister(0), slot * kPointerSize);
+ if (instr->InputAt(0)->IsDoubleRegister()) {
+ __ PokePair(i.InputFloat64Register(1), i.InputFloat64Register(0),
+ slot * kPointerSize);
+ } else {
+ __ PokePair(i.InputRegister(1), i.InputRegister(0),
+ slot * kPointerSize);
+ }
break;
}
case kArm64Clz:
@@ -1292,9 +1302,18 @@ void CodeGenerator::AssemblePrologue() {
__ SetStackPointer(jssp);
__ Prologue(info->IsCodePreAgingActive());
} else if (frame()->needs_frame()) {
- __ SetStackPointer(jssp);
+ if (descriptor->UseNativeStack()) {
+ __ SetStackPointer(csp);
+ } else {
+ __ SetStackPointer(jssp);
+ }
__ StubPrologue();
} else {
+ if (descriptor->UseNativeStack()) {
+ __ SetStackPointer(csp);
+ } else {
+ __ SetStackPointer(jssp);
+ }
frame()->SetElidedFrameSizeInSlots(0);
}
frame_access_state()->SetFrameAccessToDefault();
@@ -1315,9 +1334,12 @@ void CodeGenerator::AssemblePrologue() {
stack_shrink_slots -= OsrHelper(info()).UnoptimizedFrameSlots();
}
- if (csp.Is(masm()->StackPointer())) {
+ // If frame()->needs_frame() is false, then
+ // frame()->AlignSavedCalleeRegisterSlots() is guaranteed to return 0.
+ if (csp.Is(masm()->StackPointer()) && frame()->needs_frame()) {
// The system stack pointer requires 16-byte alignment at function call
// boundaries.
+
stack_shrink_slots += frame()->AlignSavedCalleeRegisterSlots();
}
__ Claim(stack_shrink_slots);
@@ -1374,9 +1396,15 @@ void CodeGenerator::AssembleReturn() {
return;
} else {
__ Bind(&return_label_);
- __ Mov(jssp, fp);
+ if (descriptor->UseNativeStack()) {
+ __ Mov(csp, fp);
+ } else {
+ __ Mov(jssp, fp);
+ }
__ Pop(fp, lr);
}
+ } else if (descriptor->UseNativeStack()) {
+ pop_count += (pop_count & 1);
}
__ Drop(pop_count);
__ Ret();
« no previous file with comments | « src/arm64/macro-assembler-arm64.cc ('k') | src/compiler/arm64/instruction-selector-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698