Commit 8df5142c authored by Milad Fa's avatar Milad Fa Committed by Commit Bot

S390: make use of kS390_Push during EmitPrepareArguments

kS390_Push will also reserve the needed space on the stack
so there is no need for StackClaim anymore.

Change-Id: I0f7f410d7dbd8ec880335fcbdf29f492d3dd3858
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2627867Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72080}
parent aae6b56e
...@@ -1991,12 +1991,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( ...@@ -1991,12 +1991,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
__ CanonicalizeNaN(result, value); __ CanonicalizeNaN(result, value);
break; break;
} }
case kS390_StackClaim: {
int num_slots = i.InputInt32(0);
__ lay(sp, MemOperand(sp, -num_slots * kSystemPointerSize));
frame_access_state()->IncreaseSPDelta(num_slots);
break;
}
case kS390_Push: case kS390_Push:
if (instr->InputAt(0)->IsFPRegister()) { if (instr->InputAt(0)->IsFPRegister()) {
LocationOperand* op = LocationOperand::cast(instr->InputAt(0)); LocationOperand* op = LocationOperand::cast(instr->InputAt(0));
......
...@@ -92,7 +92,6 @@ namespace compiler { ...@@ -92,7 +92,6 @@ namespace compiler {
V(S390_Tst64) \ V(S390_Tst64) \
V(S390_Push) \ V(S390_Push) \
V(S390_PushFrame) \ V(S390_PushFrame) \
V(S390_StackClaim) \
V(S390_StoreToStackSlot) \ V(S390_StoreToStackSlot) \
V(S390_SignExtendWord8ToInt32) \ V(S390_SignExtendWord8ToInt32) \
V(S390_SignExtendWord16ToInt32) \ V(S390_SignExtendWord16ToInt32) \
......
...@@ -367,7 +367,6 @@ int InstructionScheduler::GetTargetInstructionFlags( ...@@ -367,7 +367,6 @@ int InstructionScheduler::GetTargetInstructionFlags(
case kS390_Push: case kS390_Push:
case kS390_PushFrame: case kS390_PushFrame:
case kS390_StoreToStackSlot: case kS390_StoreToStackSlot:
case kS390_StackClaim:
return kHasSideEffect; return kHasSideEffect;
case kS390_Word64AtomicExchangeUint8: case kS390_Word64AtomicExchangeUint8:
......
...@@ -2119,36 +2119,11 @@ void InstructionSelector::EmitPrepareArguments( ...@@ -2119,36 +2119,11 @@ void InstructionSelector::EmitPrepareArguments(
} }
} else { } else {
// Push any stack arguments. // Push any stack arguments.
int num_slots = 0; for (PushParameter input : base::Reversed(*arguments)) {
int slot = 0;
#define INPUT_SWITCH(param) \
switch (input.location.GetType().representation()) { \
case MachineRepresentation::kSimd128: \
param += kSimd128Size / kSystemPointerSize; \
break; \
case MachineRepresentation::kFloat64: \
param += kDoubleSize / kSystemPointerSize; \
break; \
default: \
param += 1; \
break; \
}
for (PushParameter input : *arguments) {
if (input.node == nullptr) continue;
INPUT_SWITCH(num_slots)
}
Emit(kS390_StackClaim, g.NoOutput(), g.TempImmediate(num_slots));
for (PushParameter input : *arguments) {
// Skip any alignment holes in pushed nodes. // Skip any alignment holes in pushed nodes.
if (input.node) { if (input.node == nullptr) continue;
Emit(kS390_StoreToStackSlot, g.NoOutput(), g.UseRegister(input.node), Emit(kS390_Push, g.NoOutput(), g.UseRegister(input.node));
g.TempImmediate(slot));
INPUT_SWITCH(slot)
}
} }
#undef INPUT_SWITCH
DCHECK(num_slots == slot);
} }
} }
......
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