Commit c39660a4 authored by bjaideep's avatar bjaideep Committed by Commit bot

PPC/s390: [stubs] Convert GrowElementsStub to TurboFan

Port eb841269

Original commit message:

    One caveat: the Crankshaft stub used to preserve callee-clobbered double
    registers, which is contrary to any real platform ABI that we support. Since the
    only current use of this stub is in Crankshaft, the instruction there now must
    be marked as double-clobbering. This might result in a small performance
    regression. However, when this stub is eventually used in TF-generated code, it
    will be called from deferred code that can save doubles only on the rarely-taken
    path... something that Crankshaft can't do.

R=danno@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=chromium:608675
LOG=N

Review-Url: https://codereview.chromium.org/2227673003
Cr-Commit-Position: refs/heads/master@{#38444}
parent dc884581
...@@ -4443,8 +4443,7 @@ void LCodeGen::DoDeferredMaybeGrowElements(LMaybeGrowElements* instr) { ...@@ -4443,8 +4443,7 @@ void LCodeGen::DoDeferredMaybeGrowElements(LMaybeGrowElements* instr) {
__ SmiTag(r6, ToRegister(key)); __ SmiTag(r6, ToRegister(key));
} }
GrowArrayElementsStub stub(isolate(), instr->hydrogen()->is_js_array(), GrowArrayElementsStub stub(isolate(), instr->hydrogen()->kind());
instr->hydrogen()->kind());
__ CallStub(&stub); __ CallStub(&stub);
RecordSafepointWithLazyDeopt( RecordSafepointWithLazyDeopt(
instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS);
......
...@@ -2103,6 +2103,8 @@ class LMaybeGrowElements final : public LTemplateInstruction<1, 5, 0> { ...@@ -2103,6 +2103,8 @@ class LMaybeGrowElements final : public LTemplateInstruction<1, 5, 0> {
LOperand* key() { return inputs_[3]; } LOperand* key() { return inputs_[3]; }
LOperand* current_capacity() { return inputs_[4]; } LOperand* current_capacity() { return inputs_[4]; }
bool ClobbersDoubleRegisters(Isolate* isolate) const override { return true; }
DECLARE_HYDROGEN_ACCESSOR(MaybeGrowElements) DECLARE_HYDROGEN_ACCESSOR(MaybeGrowElements)
DECLARE_CONCRETE_INSTRUCTION(MaybeGrowElements, "maybe-grow-elements") DECLARE_CONCRETE_INSTRUCTION(MaybeGrowElements, "maybe-grow-elements")
}; };
......
...@@ -4383,8 +4383,7 @@ void LCodeGen::DoDeferredMaybeGrowElements(LMaybeGrowElements* instr) { ...@@ -4383,8 +4383,7 @@ void LCodeGen::DoDeferredMaybeGrowElements(LMaybeGrowElements* instr) {
__ SmiTag(r5, ToRegister(key)); __ SmiTag(r5, ToRegister(key));
} }
GrowArrayElementsStub stub(isolate(), instr->hydrogen()->is_js_array(), GrowArrayElementsStub stub(isolate(), instr->hydrogen()->kind());
instr->hydrogen()->kind());
__ CallStub(&stub); __ CallStub(&stub);
RecordSafepointWithLazyDeopt( RecordSafepointWithLazyDeopt(
instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS);
......
...@@ -1967,6 +1967,8 @@ class LMaybeGrowElements final : public LTemplateInstruction<1, 5, 0> { ...@@ -1967,6 +1967,8 @@ class LMaybeGrowElements final : public LTemplateInstruction<1, 5, 0> {
LOperand* key() { return inputs_[3]; } LOperand* key() { return inputs_[3]; }
LOperand* current_capacity() { return inputs_[4]; } LOperand* current_capacity() { return inputs_[4]; }
bool ClobbersDoubleRegisters(Isolate* isolate) const override { return true; }
DECLARE_HYDROGEN_ACCESSOR(MaybeGrowElements) DECLARE_HYDROGEN_ACCESSOR(MaybeGrowElements)
DECLARE_CONCRETE_INSTRUCTION(MaybeGrowElements, "maybe-grow-elements") DECLARE_CONCRETE_INSTRUCTION(MaybeGrowElements, "maybe-grow-elements")
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment