diff options
author | Zoltan Varga <vargaz@gmail.com> | 2018-07-12 16:22:48 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2018-07-16 20:50:49 +0300 |
commit | db33692ca02ab8cf75dbb2c44a64cce036e4ba9e (patch) | |
tree | d40d9b845197446fcf1f2588cddbe192875ce22f | |
parent | 10feb7c1d86bf82a1928706d3a905a38d111c58b (diff) |
[llvm] Avoid using the preserveall calling convention in another place on watchos.2017-12
Fixes https://github.com/mono/mono/issues/9318.
-rw-r--r-- | mono/mini/mini-llvm.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/mono/mini/mini-llvm.c b/mono/mini/mini-llvm.c index 7e53ef07466..ddd23895a62 100644 --- a/mono/mini/mini-llvm.c +++ b/mono/mini/mini-llvm.c @@ -1023,6 +1023,14 @@ set_preserveall_cc (LLVMValueRef func) #endif } +static void +set_call_preserveall_cc (LLVMValueRef func) +{ +#ifndef TARGET_WATCHOS + mono_llvm_set_call_preserveall_cc (func); +#endif +} + /* * get_bb: * @@ -2848,7 +2856,7 @@ emit_init_method (EmitContext *ctx) * This enables llvm to keep arguments in their original registers/ * scratch registers, since the call will not clobber them. */ - mono_llvm_set_call_preserveall_cc (call); + set_call_preserveall_cc (call); LLVMBuildBr (builder, inited_bb); ctx->bblocks [cfg->bb_entry->block_num].end_bblock = inited_bb; @@ -3554,7 +3562,7 @@ process_call (EmitContext *ctx, MonoBasicBlock *bb, LLVMBuilderRef *builder_ref, if (!sig->pinvoke && !cfg->llvm_only) LLVMSetInstructionCallConv (lcall, LLVMMono1CallConv); if (preserveall) - mono_llvm_set_call_preserveall_cc (lcall); + set_call_preserveall_cc (lcall); if (cinfo->ret.storage == LLVMArgVtypeByRef) mono_llvm_add_instr_attr (lcall, 1 + cinfo->vret_arg_pindex, LLVM_ATTR_STRUCT_RET); |