Commit 28a9235c authored by Junliang Yan's avatar Junliang Yan Committed by Commit Bot

s390x: Fix turbofan c linkage

In C to WASM stubs, when number of parameters is more than 5, or
anything requires stack arguments, current linkage is faulty
because of missing STACK_SHADOW_WORDS

Drive-by: Also cleanup s390 code which is not supported anymore.

R=joransiu@ca.ibm.com

Change-Id: I7405c32fd94e158e6868f9ce7d4390c995078dbb
Reviewed-on: https://chromium-review.googlesource.com/c/1257269Reviewed-by: 's avatarJoran Siu <joransiu@ca.ibm.com>
Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#56352}
parent cb8d93e1
......@@ -117,6 +117,7 @@ namespace {
// ===========================================================================
// == s390x ==================================================================
// ===========================================================================
#define STACK_SHADOW_WORDS 20
#define PARAM_REGISTERS r2, r3, r4, r5, r6
#define CALLEE_SAVE_REGISTERS \
r6.bit() | r7.bit() | r8.bit() | r9.bit() | r10.bit() | ip.bit() | r13.bit()
......@@ -124,15 +125,6 @@ namespace {
d8.bit() | d9.bit() | d10.bit() | d11.bit() | d12.bit() | d13.bit() | \
d14.bit() | d15.bit()
#elif V8_TARGET_ARCH_S390
// ===========================================================================
// == s390 ===================================================================
// ===========================================================================
#define PARAM_REGISTERS r2, r3, r4, r5, r6
#define CALLEE_SAVE_REGISTERS \
r6.bit() | r7.bit() | r8.bit() | r9.bit() | r10.bit() | ip.bit() | r13.bit()
#define CALLEE_SAVE_FP_REGISTERS (d4.bit() | d6.bit())
#else
// ===========================================================================
// == unknown ================================================================
......
......@@ -2162,6 +2162,7 @@ void InstructionSelector::EmitPrepareArguments(
// Poke any stack arguments.
int slot = kStackFrameExtraParamSlot;
for (PushParameter input : (*arguments)) {
if (input.node == nullptr) continue;
Emit(kS390_StoreToStackSlot, g.NoOutput(), g.UseRegister(input.node),
g.TempImmediate(slot));
++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