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

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

Issue 1284893002: Reland: [turbofan] Various fixes to allow unboxed doubles as arguments in registers and on the stac… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/mips/code-generator-mips.cc ('k') | src/compiler/ppc/code-generator-ppc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/mips64/code-generator-mips64.cc
diff --git a/src/compiler/mips64/code-generator-mips64.cc b/src/compiler/mips64/code-generator-mips64.cc
index 1c4a789229b4b6b10e1dca922f9d699124b875f5..c95522b4a98b7d6e71a8e5671e25e1e8f11ccd9b 100644
--- a/src/compiler/mips64/code-generator-mips64.cc
+++ b/src/compiler/mips64/code-generator-mips64.cc
@@ -106,12 +106,9 @@ class MipsOperandConverter final : public InstructionOperandConverter {
MemOperand ToMemOperand(InstructionOperand* op) const {
DCHECK(op != NULL);
- DCHECK(!op->IsRegister());
- DCHECK(!op->IsDoubleRegister());
DCHECK(op->IsStackSlot() || op->IsDoubleStackSlot());
- // The linkage computes where all spill slots are located.
- FrameOffset offset = linkage()->GetFrameOffset(
- AllocatedOperand::cast(op)->index(), frame(), 0);
+ FrameOffset offset =
+ linkage()->GetFrameOffset(AllocatedOperand::cast(op)->index(), frame());
return MemOperand(offset.from_stack_pointer() ? sp : fp, offset.offset());
}
};
@@ -1158,13 +1155,14 @@ void CodeGenerator::AssemblePrologue() {
// kNumCalleeSaved includes the fp register, but the fp register
// is saved separately in TF.
DCHECK(kNumCalleeSaved == base::bits::CountPopulation32(saves) + 1);
- int register_save_area_size = kNumCalleeSaved * kPointerSize;
+ int register_save_area_size =
+ base::bits::CountPopulation32(saves) * kPointerSize;
const RegList saves_fpu = descriptor->CalleeSavedFPRegisters();
// Save callee-saved FPU registers.
__ MultiPushFPU(saves_fpu);
DCHECK(kNumCalleeSavedFPU == base::bits::CountPopulation32(saves_fpu));
- register_save_area_size += kNumCalleeSavedFPU * kDoubleSize * kPointerSize;
+ register_save_area_size += kNumCalleeSavedFPU * kDoubleSize;
frame()->SetRegisterSaveAreaSize(register_save_area_size);
} else if (descriptor->IsJSFunctionCall()) {
@@ -1176,6 +1174,8 @@ void CodeGenerator::AssemblePrologue() {
__ StubPrologue();
frame()->SetRegisterSaveAreaSize(
StandardFrameConstants::kFixedFrameSizeFromFp);
+ } else {
+ frame()->SetPCOnStack(false);
}
if (info()->is_osr()) {
@@ -1203,6 +1203,7 @@ void CodeGenerator::AssemblePrologue() {
void CodeGenerator::AssembleReturn() {
CallDescriptor* descriptor = linkage()->GetIncomingDescriptor();
int stack_slots = frame()->GetSpillSlotCount();
+ int pop_count = static_cast<int>(descriptor->StackParameterCount());
if (descriptor->kind() == CallDescriptor::kCallAddress) {
if (frame()->GetRegisterSaveAreaSize() > 0) {
// Remove this frame's spill slots first.
@@ -1219,22 +1220,19 @@ void CodeGenerator::AssembleReturn() {
}
__ mov(sp, fp);
__ Pop(ra, fp);
- __ Ret();
} else if (descriptor->IsJSFunctionCall() || needs_frame_) {
// Canonicalize JSFunction return sites for now.
if (return_label_.is_bound()) {
__ Branch(&return_label_);
+ return;
} else {
__ bind(&return_label_);
__ mov(sp, fp);
__ Pop(ra, fp);
- int pop_count = static_cast<int>(descriptor->StackParameterCount());
- if (pop_count != 0) {
- __ DropAndRet(pop_count);
- } else {
- __ Ret();
- }
}
+ }
+ if (pop_count != 0) {
+ __ DropAndRet(pop_count);
} else {
__ Ret();
}
« no previous file with comments | « src/compiler/mips/code-generator-mips.cc ('k') | src/compiler/ppc/code-generator-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698