From 3376ff2d67191d260d44a42f751ee25353e61adb Mon Sep 17 00:00:00 2001 From: Jay Krell Date: Mon, 30 Apr 2018 14:25:27 -0700 Subject: [PATCH] [Tailcall PowerPC] OP_TAILCALL_PARAMETER support. (#8500) --- mono/mini/cpu-ppc.md | 4 ++++ mono/mini/mini-ppc.c | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/mono/mini/cpu-ppc.md b/mono/mini/cpu-ppc.md index dc5d587ab1d..5eea6e3cf9d 100644 --- a/mono/mini/cpu-ppc.md +++ b/mono/mini/cpu-ppc.md @@ -52,6 +52,10 @@ break: len:32 seq_point: len:24 il_seq_point: len:0 tailcall: len:120 clob:c + +# PowerPC outputs a nice fixed size memcpy loop for larger stack_usage, so 0. +tailcall_parameter: len:0 + call: dest:a clob:c len:16 br: len:4 throw: src1:i len:20 diff --git a/mono/mini/mini-ppc.c b/mono/mini/mini-ppc.c index 76677a95955..e02d37187a4 100644 --- a/mono/mini/mini-ppc.c +++ b/mono/mini/mini-ppc.c @@ -3816,6 +3816,13 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) case OP_FCONV_TO_R4: ppc_frsp (code, ins->dreg, ins->sreg1); break; + + case OP_TAILCALL_PARAMETER: + // This opcode helps compute sizes, i.e. + // of the subsequent OP_TAILCALL, but contributes no code. + g_assert (ins->next); + break; + case OP_TAILCALL: { int i, pos; MonoCallInst *call = (MonoCallInst*)ins; -- 2.11.4.GIT