From patchwork Mon Mar 23 14:46:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Pan2 via Gcc-patches" X-Patchwork-Id: 1260078 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=Tg/r8Fjb; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48mHKl4yNYz9sPk for ; Tue, 24 Mar 2020 01:47:39 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 36D1D385E013; Mon, 23 Mar 2020 14:47:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 36D1D385E013 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1584974855; bh=fJ/hDWEVInBTs7vP/MZgtne/jw03BdlO23CT/uynsZg=; h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Tg/r8Fjbfv3ceQQ49d6mvy/sLkaHF/q3zIJ5i5ZJI/2uy7JicNkJ9efEopE+oWQIs fwYSsxkp7GRn1FQaETg9OGHxx0D2vOUKo4+N06LvHcaVf7vf8te2ke0MMUysPIH1ho iaclY+rxk8noYKl47WPopX0YjbScIoIYq+rZYfNA= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-il1-x143.google.com (mail-il1-x143.google.com [IPv6:2607:f8b0:4864:20::143]) by sourceware.org (Postfix) with ESMTPS id AC586385E013; Mon, 23 Mar 2020 14:47:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org AC586385E013 Received: by mail-il1-x143.google.com with SMTP id e8so13304556ilc.13; Mon, 23 Mar 2020 07:47:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=fJ/hDWEVInBTs7vP/MZgtne/jw03BdlO23CT/uynsZg=; b=US0eaFyeWu+7vn2wK52R68W2dF0ZhWChiy4cGnhQOatSvXTTt1rcdLVQ1Zu44hzcFR FrOpT5L1n9SlfZ7gy4JUdMpz/M8w/EHNVPmclSog6o+v+uBaFTFqzJCWOgmTF2Od9Sj3 nW3vt80AGl5PoSHXRTkzxwh8dDz690/Co4r5kKxCCT2cpe+2nkEDzf6Mh7lxC7uJDP2f 217RoRnG9R80GfisvWeKU1Rpx2ZBhwsgBEnTcecrhmeHmx7wtqH4AgjOsgp+B+lSm+LC DoCldJ2qPcQ4e5ll2QFFUYOfjT22wZHj9K2/Z3tn6QB1tWWj7Cj0sxzMSgUs3PDeBPE/ 3rGw== X-Gm-Message-State: ANhLgQ27bCRXSRDhVdC5het0BLnoYJukpEPs+fFaASdSaeV/Y7NEmEBv gAJeSXNeK+pNrLunZJt9sQquj5JkdKimznJsrKSW+s+e9ME= X-Google-Smtp-Source: ADFU+vvMQXuYM2FaaB8dRTtCsD6Cp+i1G54oYT/3W8TxkRKtfgi/dhra9YFLgzFslbf0uyJTaeSeGSgRq2pnlFROx3I= X-Received: by 2002:a92:5e92:: with SMTP id f18mr20908002ilg.19.1584974847892; Mon, 23 Mar 2020 07:47:27 -0700 (PDT) MIME-Version: 1.0 Date: Mon, 23 Mar 2020 20:16:51 +0530 Message-ID: Subject: [PATCH][PPC64] [PR88877] To: gcc-patches@gcc.gnu.org, Segher Boessenkool , jakub@redhat.com, rguenth@gcc.gnu.org X-Spam-Status: No, score=-25.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, SUBJ_ALL_CAPS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: kamlesh kumar via Gcc-patches From: "Li, Pan2 via Gcc-patches" Reply-To: kamlesh kumar Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Attached patch fixes. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88877. ChangeLog Entry. 2020-03-23 Kamlesh Kumar * rtl.h : Defined Tuple for bundling rtx, mode and unsignedness default as 0 Added Extra argument (unsignedp) in emit_library_call and emit_library_call_value. * except.c : Likewise. * explow.c : Likewise. * expmed.c : Likewise. * expr.c : Likewise. * optabs.c : Likewise. * asan.c : Likewise. * builtins.c : Likewise. * calls.c : Likewise. * cfgexpand.c : Likewise. * config/aarch64/aarch64.c : Likewise. * config/aarch64/aarch64.h : Likewise. * config/aarch64/atomics.md : Likewise. * config/alpha/alpha.c : Likewise. * config/arc/arc.c : Likewise. * config/arc/elf.h : Likewise. * config/arc/linux.h : Likewise. * config/arm/arm.c : Likewise. * config/bfin/bfin.md : Likewise. * config/c6x/c6x.c : Likewise. * config/csky/csky.c : Likewise. * config/frv/frv.c : Likewise. * config/i386/i386-expand.c : Likewise. * config/i386/i386.c : Likewise. * config/ia64/ia64.c : Likewise. * config/ia64/ia64.md : Likewise. * config/m32r/m32r.c : Likewise. * config/m68k/linux.h : Likewise. * config/m68k/m68k.c : Likewise. * config/microblaze/microblaze.c : Likewise. * config/mips/mips.h : Likewise. * config/mips/sdemtk.h : Likewise. * config/nds32/nds32.h : Likewise. * config/nios2/nios2.c : Likewise. * config/or1k/or1k.c : Likewise. * config/pa/pa.c : Likewise. * config/pa/pa.md : Likewise. * config/pru/pru.c : Likewise. * config/riscv/riscv.h : Likewise. * config/riscv/riscv.md : Likewise. * config/rl78/rl78.c : Likewise. * config/rs6000/rs6000-string.c : Likewise. * config/rs6000/rs6000.c : Likewise. * config/rs6000/rs6000.md : Likewise. * config/rs6000/vsx.md : Likewise. * config/sh/sh.c : Likewise. * config/sparc/sparc.c : Likewise. * config/tilegx/tilegx.c : Likewise. * config/tilepro/tilepro.c : Likewise. * config/visium/visium.c : Likewise. * config/xtensa/xtensa.c : Likewise. * testsuite/gcc.target/powerpc/pr88877.c : Newtest diff --git a/gcc/asan.c b/gcc/asan.c index cc8f9122e3d..ec4d6bdc161 100644 --- a/gcc/asan.c +++ b/gcc/asan.c @@ -1488,7 +1488,7 @@ asan_emit_stack_protection (rtx base, rtx pbase, unsigned int alignb, ret = emit_library_call_value (ret, NULL_RTX, LCT_NORMAL, ptr_mode, GEN_INT (asan_frame_size + base_align_bias), - TYPE_MODE (pointer_sized_int_node)); + TYPE_MODE (pointer_sized_int_node), 0); /* __asan_stack_malloc_[n] returns a pointer to fake stack if succeeded and NULL otherwise. Check RET value is NULL here and jump over the BASE reassignment in this case. Otherwise, reassign BASE to RET. */ @@ -1615,7 +1615,7 @@ asan_emit_stack_protection (rtx base, rtx pbase, unsigned int alignb, emit_library_call (ret, LCT_NORMAL, ptr_mode, addr, ptr_mode, GEN_INT (asan_frame_size + base_align_bias), TYPE_MODE (pointer_sized_int_node), - orig_addr, ptr_mode); + orig_addr, ptr_mode, 0); } lab = gen_label_rtx (); emit_jump (lab); @@ -1715,7 +1715,7 @@ asan_emit_allocas_unpoison (rtx top, rtx bot, rtx_insn *before) top = convert_memory_address (ptr_mode, top); bot = convert_memory_address (ptr_mode, bot); emit_library_call (ret, LCT_NORMAL, ptr_mode, - top, ptr_mode, bot, ptr_mode); + top, ptr_mode, bot, ptr_mode, 0); do_pending_stack_adjust (); rtx_insn *insns = get_insns (); diff --git a/gcc/builtins.c b/gcc/builtins.c index 53bae599d3e..99fa50bd515 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -2979,7 +2979,7 @@ expand_builtin_powi (tree exp, rtx target) target = emit_library_call_value (optab_libfunc (powi_optab, mode), target, LCT_CONST, mode, - op0, mode, op1, mode2); + op0, mode, op1, mode2, 0); return target; } @@ -5858,7 +5858,7 @@ expand_asan_emit_allocas_unpoison (tree exp) OPTAB_LIB_WIDEN); rtx ret = init_one_libfunc ("__asan_allocas_unpoison"); ret = emit_library_call_value (ret, NULL_RTX, LCT_NORMAL, ptr_mode, - top, ptr_mode, bot, ptr_mode); + top, ptr_mode, bot, ptr_mode, 0); return ret; } diff --git a/gcc/calls.c b/gcc/calls.c index 4c3a8f3c215..20324ff6f04 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -5247,7 +5247,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value, { rtx val = args[i].first; function_arg_info arg (args[i].second, /*named=*/true); - int unsigned_p = 0; + int unsigned_p = GET_THIRD(args[i]); /* We cannot convert the arg value to the mode the library wants here; must do it earlier where we know the signedness of the arg. */ diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index a7ec77d5c85..c5e7c67b5e8 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -6244,7 +6244,7 @@ expand_main_function (void) || (!defined(HAS_INIT_SECTION) \ && !defined(INIT_SECTION_ASM_OP) \ && !defined(INIT_ARRAY_SECTION_ASM_OP))) - emit_library_call (init_one_libfunc (NAME__MAIN), LCT_NORMAL, VOIDmode); + emit_library_call (init_one_libfunc (NAME__MAIN), LCT_NORMAL, VOIDmode, 0); #endif } diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index c90de65de12..69a476bfdcc 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -10356,7 +10356,7 @@ aarch64_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value) emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__clear_cache"), LCT_NORMAL, VOIDmode, a_tramp, ptr_mode, plus_constant (ptr_mode, a_tramp, TRAMPOLINE_SIZE), - ptr_mode); + ptr_mode, 0); } static unsigned char @@ -18516,7 +18516,7 @@ aarch64_expand_compare_and_swap (rtx operands[]) rtx func = aarch64_atomic_ool_func (mode, mod_s, &aarch64_ool_cas_names); rval = emit_library_call_value (func, NULL_RTX, LCT_NORMAL, r_mode, oldval, mode, newval, mode, - XEXP (mem, 0), Pmode); + XEXP (mem, 0), Pmode, 0); cc_reg = aarch64_gen_compare_reg_maybe_ze (NE, rval, oldval, mode); } else diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h index 8f08bad3562..983d7a543b0 100644 --- a/gcc/config/aarch64/aarch64.h +++ b/gcc/config/aarch64/aarch64.h @@ -1092,7 +1092,7 @@ typedef struct rtx fun, lr; \ lr = get_hard_reg_initial_val (Pmode, LR_REGNUM); \ fun = gen_rtx_SYMBOL_REF (Pmode, MCOUNT_NAME); \ - emit_library_call (fun, LCT_NORMAL, VOIDmode, lr, Pmode); \ + emit_library_call (fun, LCT_NORMAL, VOIDmode, lr, Pmode, 0); \ } /* All the work done in PROFILE_HOOK, but still required. */ diff --git a/gcc/config/aarch64/atomics.md b/gcc/config/aarch64/atomics.md index 996947799b5..581f2732399 100644 --- a/gcc/config/aarch64/atomics.md +++ b/gcc/config/aarch64/atomics.md @@ -199,7 +199,7 @@ &aarch64_ool_swp_names); rtx rval = emit_library_call_value (func, operands[0], LCT_NORMAL, mode, operands[2], mode, - XEXP (operands[1], 0), Pmode); + XEXP (operands[1], 0), Pmode, 0); emit_move_insn (operands[0], rval); } else @@ -321,7 +321,7 @@ rtx func = aarch64_atomic_ool_func (mode, operands[2], names); emit_library_call_value (func, NULL_RTX, LCT_NORMAL, mode, operands[1], mode, - XEXP (operands[0], 0), Pmode); + XEXP (operands[0], 0), Pmode, 0); DONE; } else @@ -479,7 +479,7 @@ rtx func = aarch64_atomic_ool_func (mode, operands[3], names); rtx rval = emit_library_call_value (func, operands[0], LCT_NORMAL, mode, operands[2], mode, - XEXP (operands[1], 0), Pmode); + XEXP (operands[1], 0), Pmode, 0); emit_move_insn (operands[0], rval); DONE; } diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 7e5d1cbb0c4..426719f23a5 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -5533,7 +5533,7 @@ alpha_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value) emit_insn (gen_imb ()); #ifdef HAVE_ENABLE_EXECUTE_STACK emit_library_call (init_one_libfunc ("__enable_execute_stack"), - LCT_NORMAL, VOIDmode, XEXP (m_tramp, 0), Pmode); + LCT_NORMAL, VOIDmode, XEXP (m_tramp, 0), Pmode, 0); #endif } } diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c index 922ccc5c9f9..7d263f688be 100644 --- a/gcc/config/arc/arc.c +++ b/gcc/config/arc/arc.c @@ -4421,7 +4421,7 @@ arc_initialize_trampoline (rtx tramp, tree fndecl, rtx cxt) emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__clear_cache"), LCT_NORMAL, VOIDmode, XEXP (tramp, 0), Pmode, plus_constant (Pmode, XEXP (tramp, 0), TRAMPOLINE_SIZE), - Pmode); + Pmode, 0); } /* Add the given function declaration to emit code in JLI section. */ diff --git a/gcc/config/arc/elf.h b/gcc/config/arc/elf.h index 1fd29cfeaf8..56523d3e331 100644 --- a/gcc/config/arc/elf.h +++ b/gcc/config/arc/elf.h @@ -85,7 +85,7 @@ along with GCC; see the file COPYING3. If not see { \ rtx fun; \ fun = gen_rtx_SYMBOL_REF (Pmode, "__mcount"); \ - emit_library_call (fun, LCT_NORMAL, VOIDmode); \ + emit_library_call (fun, LCT_NORMAL, VOIDmode, 0); \ } /* Enter/Leave default value. */ diff --git a/gcc/config/arc/linux.h b/gcc/config/arc/linux.h index 0b99da3fcda..eb44e2e915d 100644 --- a/gcc/config/arc/linux.h +++ b/gcc/config/arc/linux.h @@ -131,7 +131,7 @@ along with GCC; see the file COPYING3. If not see rtx fun, rt; \ rt = get_hard_reg_initial_val (Pmode, RETURN_ADDR_REGNUM); \ fun = gen_rtx_SYMBOL_REF (Pmode, "_mcount"); \ - emit_library_call (fun, LCT_NORMAL, VOIDmode, rt, Pmode); \ + emit_library_call (fun, LCT_NORMAL, VOIDmode, rt, Pmode, 0); \ } /* Enter/Leave ops are default off for linux targets. */ diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 9b799084d44..3736e947b69 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -4151,7 +4151,7 @@ arm_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value) a_tramp = XEXP (m_tramp, 0); emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__clear_cache"), LCT_NORMAL, VOIDmode, a_tramp, Pmode, - plus_constant (Pmode, a_tramp, TRAMPOLINE_SIZE), Pmode); + plus_constant (Pmode, a_tramp, TRAMPOLINE_SIZE), Pmode, 0); } /* Thumb trampolines should be entered in thumb mode, so set @@ -8918,7 +8918,7 @@ arm_call_tls_get_addr (rtx x, rtx reg, rtx *valuep, int reloc) *valuep = emit_library_call_value (get_tls_get_addr (), NULL_RTX, LCT_PURE, /* LCT_CONST? */ - Pmode, reg, Pmode); + Pmode, reg, Pmode, 0); rtx_insn *insns = get_insns (); end_sequence (); @@ -32883,7 +32883,7 @@ arm_expand_divmod_libfunc (rtx libfunc, machine_mode mode, rtx libval = emit_library_call_value (libfunc, NULL_RTX, LCT_CONST, libval_mode, op0, GET_MODE (op0), - op1, GET_MODE (op1)); + op1, GET_MODE (op1), 0); rtx quotient = simplify_gen_subreg (mode, libval, libval_mode, 0); rtx remainder = simplify_gen_subreg (mode, libval, libval_mode, @@ -33097,7 +33097,7 @@ arm_constant_alignment (const_tree exp, HOST_WIDE_INT align) void arm_emit_speculation_barrier_function () { - emit_library_call (speculation_barrier_libfunc, LCT_NORMAL, VOIDmode); + emit_library_call (speculation_barrier_libfunc, LCT_NORMAL, VOIDmode, 0); } /* Have we recorded an explicit access to the Q bit of APSR?. */ diff --git a/gcc/config/bfin/bfin.md b/gcc/config/bfin/bfin.md index aecb8138181..094d5589bad 100644 --- a/gcc/config/bfin/bfin.md +++ b/gcc/config/bfin/bfin.md @@ -1580,7 +1580,7 @@ emit_library_call_value (umulsi3_highpart_libfunc, operands[0], LCT_NORMAL, SImode, - operands[1], SImode, operands[2], SImode); + operands[1], SImode, operands[2], SImode, 0); } DONE; }) @@ -1630,7 +1630,7 @@ emit_library_call_value (smulsi3_highpart_libfunc, operands[0], LCT_NORMAL, SImode, - operands[1], SImode, operands[2], SImode); + operands[1], SImode, operands[2], SImode, 0); } DONE; }) diff --git a/gcc/config/c6x/c6x.c b/gcc/config/c6x/c6x.c index 39b0f753047..a68dbc6f344 100644 --- a/gcc/config/c6x/c6x.c +++ b/gcc/config/c6x/c6x.c @@ -727,7 +727,7 @@ c6x_initialize_trampoline (rtx tramp, tree fndecl, rtx cxt) tramp = XEXP (tramp, 0); emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__gnu_clear_cache"), LCT_NORMAL, VOIDmode, tramp, Pmode, - plus_constant (Pmode, tramp, TRAMPOLINE_SIZE), Pmode); + plus_constant (Pmode, tramp, TRAMPOLINE_SIZE), Pmode, 0); #endif } @@ -1579,7 +1579,7 @@ c6x_expand_compare (rtx comparison, machine_mode mode) start_sequence (); cmp = emit_library_call_value (libfunc, 0, LCT_CONST, SImode, - op0, op_mode, op1, op_mode); + op0, op_mode, op1, op_mode, 0); insns = get_insns (); end_sequence (); @@ -1715,7 +1715,7 @@ c6x_expand_cpymem (rtx dst, rtx src, rtx count_exp, rtx align_exp, if (dst_expr) mark_addressable (dst_expr); emit_library_call (fn, LCT_NORMAL, VOIDmode, - dstreg, Pmode, srcreg, Pmode, count_exp, SImode); + dstreg, Pmode, srcreg, Pmode, count_exp, SImode, 0); return true; } diff --git a/gcc/config/csky/csky.c b/gcc/config/csky/csky.c index 7ba3ed3e74e..3c317dee314 100644 --- a/gcc/config/csky/csky.c +++ b/gcc/config/csky/csky.c @@ -2739,7 +2739,7 @@ csky_call_tls_get_addr (rtx x, rtx reg, rtx *valuep, int reloc) emit_insn (gen_addsi3 (reg, reg, tmp)); *valuep = emit_library_call_value (get_tls_get_addr (), NULL_RTX, LCT_PURE, /* LCT_CONST? */ - Pmode, reg, Pmode); + Pmode, reg, Pmode, 0); insns = get_insns (); end_sequence (); return insns; @@ -5858,7 +5858,7 @@ csky_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value) a_tramp = XEXP (m_tramp, 0); emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__clear_cache"), LCT_NORMAL, VOIDmode, a_tramp, Pmode, - plus_constant (Pmode, a_tramp, TRAMPOLINE_SIZE), Pmode); + plus_constant (Pmode, a_tramp, TRAMPOLINE_SIZE), Pmode, 0); } diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c index 125346dee8c..391afa6654f 100644 --- a/gcc/config/frv/frv.c +++ b/gcc/config/frv/frv.c @@ -6204,7 +6204,7 @@ frv_trampoline_init (rtx m_tramp, tree fndecl, rtx static_chain) addr, Pmode, GEN_INT (frv_trampoline_size ()), SImode, fnaddr, Pmode, - sc_reg, Pmode); + sc_reg, Pmode, 0); } diff --git a/gcc/config/i386/i386-expand.c b/gcc/config/i386/i386-expand.c index 2a7bf72318a..8abaa31d576 100644 --- a/gcc/config/i386/i386-expand.c +++ b/gcc/config/i386/i386-expand.c @@ -20268,7 +20268,7 @@ ix86_expand_divmod_libfunc (rtx libfunc, machine_mode mode, rtx quot = emit_library_call_value (libfunc, NULL_RTX, LCT_NORMAL, mode, op0, mode, op1, mode, - XEXP (rem, 0), Pmode); + XEXP (rem, 0), Pmode, 0); *quot_p = quot; *rem_p = rem; } diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 049ca4f4fdb..a1079691933 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -17100,7 +17100,7 @@ ix86_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value) if (CHECK_EXECUTE_STACK_ENABLED) #endif emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__enable_execute_stack"), - LCT_NORMAL, VOIDmode, XEXP (m_tramp, 0), Pmode); + LCT_NORMAL, VOIDmode, XEXP (m_tramp, 0), Pmode, 0); #endif } diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index 1500985a1f6..d54409b703d 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -1225,7 +1225,7 @@ ia64_expand_tls_address (enum tls_model tls_kind, rtx op0, rtx op1, tga_ret = emit_library_call_value (gen_tls_get_addr (), NULL_RTX, LCT_CONST, Pmode, - tga_op1, Pmode, tga_op2, Pmode); + tga_op1, Pmode, tga_op2, Pmode, 0); insns = get_insns (); end_sequence (); @@ -1249,7 +1249,7 @@ ia64_expand_tls_address (enum tls_model tls_kind, rtx op0, rtx op1, tga_ret = emit_library_call_value (gen_tls_get_addr (), NULL_RTX, LCT_CONST, Pmode, - tga_op1, Pmode, tga_op2, Pmode); + tga_op1, Pmode, tga_op2, Pmode, 0); insns = get_insns (); end_sequence (); @@ -1860,7 +1860,7 @@ ia64_expand_compare (rtx *expr, rtx *op0, rtx *op1) ret = emit_library_call_value (cmptf_libfunc, 0, LCT_CONST, DImode, *op0, TFmode, *op1, TFmode, - GEN_INT (magic), DImode); + GEN_INT (magic), DImode, 0); cmp = gen_reg_rtx (BImode); emit_insn (gen_rtx_SET (cmp, gen_rtx_fmt_ee (ncode, BImode, ret, const0_rtx))); @@ -11203,7 +11203,7 @@ ia64_profile_hook (int labelno) VOIDmode, gen_rtx_REG (Pmode, BR_REG (0)), Pmode, ip, Pmode, - label, Pmode); + label, Pmode, 0); } /* Return the mangling of TYPE if it is an extended fundamental type. */ diff --git a/gcc/config/ia64/ia64.md b/gcc/config/ia64/ia64.md index 15a0a025a11..9e84a550118 100644 --- a/gcc/config/ia64/ia64.md +++ b/gcc/config/ia64/ia64.md @@ -5057,7 +5057,7 @@ emit_library_call (gen_rtx_SYMBOL_REF (Pmode, \"__ia64_save_stack_nonlocal\"), LCT_NORMAL, VOIDmode, XEXP (operands[0], 0), Pmode, - operands[1], Pmode); + operands[1], Pmode, 0); DONE; }) @@ -5072,7 +5072,7 @@ LCT_NORETURN, VOIDmode, operands[1], Pmode, copy_to_reg (XEXP (operands[2], 0)), Pmode, - operands[3], Pmode); + operands[3], Pmode, 0); emit_barrier (); DONE; }) @@ -5135,7 +5135,7 @@ emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__ia64_restore_stack_nonlocal"), LCT_NORMAL, VOIDmode, - copy_to_reg (XEXP (operands[1], 0)), Pmode); + copy_to_reg (XEXP (operands[1], 0)), Pmode, 0); DONE; }) diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c index 1c015609524..02c6cd48a8b 100644 --- a/gcc/config/m32r/m32r.c +++ b/gcc/config/m32r/m32r.c @@ -2498,7 +2498,7 @@ block_move_call (rtx dest_reg, rtx src_reg, rtx bytes_rtx) VOIDmode, dest_reg, Pmode, src_reg, Pmode, convert_to_mode (TYPE_MODE (sizetype), bytes_rtx, TYPE_UNSIGNED (sizetype)), - TYPE_MODE (sizetype)); + TYPE_MODE (sizetype), 0); } /* Expand string/block move operations. @@ -2819,7 +2819,7 @@ m32r_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value) emit_library_call (m32r_function_symbol (m32r_cache_flush_func), LCT_NORMAL, VOIDmode, XEXP (m_tramp, 0), Pmode, gen_int_mode (TRAMPOLINE_SIZE, SImode), SImode, - GEN_INT (3), SImode); + GEN_INT (3), SImode, 0); } /* True if X is a reg that can be used as a base reg. */ diff --git a/gcc/config/m68k/linux.h b/gcc/config/m68k/linux.h index 0d18e5ae5ac..ab34c57679e 100644 --- a/gcc/config/m68k/linux.h +++ b/gcc/config/m68k/linux.h @@ -197,7 +197,7 @@ along with GCC; see the file COPYING3. If not see emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__clear_cache"), \ LCT_NORMAL, VOIDmode, TRAMP, Pmode, \ plus_constant (Pmode, TRAMP, TRAMPOLINE_SIZE), \ - Pmode); + Pmode, 0); /* Clear the instruction cache from `beg' to `end'. This makes an inline system call to SYS_cacheflush. The arguments are as diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index 67b109447b3..633c4dc7f56 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -2720,7 +2720,7 @@ m68k_call_tls_get_addr (rtx x, rtx eqv, enum m68k_reloc reloc) m68k_libcall_value_in_a0_p = true; a0 = emit_library_call_value (m68k_get_tls_get_addr (), NULL_RTX, LCT_PURE, - Pmode, x, Pmode); + Pmode, x, Pmode, 0); m68k_libcall_value_in_a0_p = false; insns = get_insns (); @@ -2769,7 +2769,7 @@ m68k_call_m68k_read_tp (void) /* Emit the call sequence. */ m68k_libcall_value_in_a0_p = true; a0 = emit_library_call_value (m68k_get_m68k_read_tp (), NULL_RTX, LCT_PURE, - Pmode); + Pmode, 0); m68k_libcall_value_in_a0_p = false; insns = get_insns (); end_sequence (); diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c index b4754b12160..509c9e4c0ac 100644 --- a/gcc/config/microblaze/microblaze.c +++ b/gcc/config/microblaze/microblaze.c @@ -583,7 +583,7 @@ microblaze_call_tls_get_addr (rtx x, rtx reg, rtx *valuep, int reloc) *valuep = emit_library_call_value (get_tls_get_addr (), NULL_RTX, LCT_PURE, /* LCT_CONST? */ - Pmode, reg, Pmode); + Pmode, reg, Pmode, 0); insns = get_insns (); end_sequence (); @@ -3721,7 +3721,7 @@ microblaze_expand_divide (rtx operands[]) operands[0], LCT_NORMAL, GET_MODE (operands[0]), operands[1], GET_MODE (operands[1]), - operands[2], GET_MODE (operands[2])); + operands[2], GET_MODE (operands[2]), 0); if (ret != operands[0]) emit_move_insn (operands[0], ret); diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 3ce0c19a29a..9706f2d6750 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -2577,7 +2577,7 @@ typedef struct mips_args { the system has a write-back cache. */ \ emit_library_call (gen_rtx_SYMBOL_REF (Pmode, mips_cache_flush_func), \ LCT_NORMAL, VOIDmode, ADDR, Pmode, SIZE, Pmode, \ - GEN_INT (3), TYPE_MODE (integer_type_node)) + GEN_INT (3), TYPE_MODE (integer_type_node), 0) /* Addressing modes, and classification of registers for them. */ diff --git a/gcc/config/mips/sdemtk.h b/gcc/config/mips/sdemtk.h index 6a5a8178066..dd442e07300 100644 --- a/gcc/config/mips/sdemtk.h +++ b/gcc/config/mips/sdemtk.h @@ -71,7 +71,7 @@ extern void mips_sync_icache (void *beg, unsigned long len); #define MIPS_ICACHE_SYNC(ADDR, SIZE) \ emit_library_call (gen_rtx_SYMBOL_REF (Pmode, mips_cache_flush_func), \ LCT_NORMAL, VOIDmode, ADDR, Pmode, \ - SIZE, TYPE_MODE (sizetype)) + SIZE, TYPE_MODE (sizetype), 0) /* This version of _mcount does not pop 2 words from the stack. */ #undef FUNCTION_PROFILER diff --git a/gcc/config/nds32/nds32.h b/gcc/config/nds32/nds32.h index 17a9ddc58ec..943cd161287 100644 --- a/gcc/config/nds32/nds32.h +++ b/gcc/config/nds32/nds32.h @@ -1385,7 +1385,7 @@ enum reg_class rtx fun, lp; \ lp = get_hard_reg_initial_val (Pmode, LP_REGNUM); \ fun = gen_rtx_SYMBOL_REF (Pmode, "_mcount"); \ - emit_library_call (fun, LCT_NORMAL, VOIDmode, lp, Pmode); \ + emit_library_call (fun, LCT_NORMAL, VOIDmode, lp, Pmode, 0); \ } diff --git a/gcc/config/nios2/nios2.c b/gcc/config/nios2/nios2.c index ba0a0a9ba43..cd2a4d5244e 100644 --- a/gcc/config/nios2/nios2.c +++ b/gcc/config/nios2/nios2.c @@ -1857,7 +1857,7 @@ nios2_emit_expensive_div (rtx *operands, machine_mode mode) final_result = emit_library_call_value (libfunc, NULL_RTX, LCT_CONST, SImode, operands[1], SImode, - operands[2], SImode); + operands[2], SImode, 0); insns = get_insns (); end_sequence (); @@ -3478,7 +3478,7 @@ nios2_trampoline_init (rtx m_tramp, tree fndecl, rtx cxt) emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__trampoline_setup"), LCT_NORMAL, VOIDmode, addr, Pmode, fnaddr, Pmode, - ctx_reg, Pmode); + ctx_reg, Pmode, 0); } /* Implement TARGET_FUNCTION_VALUE. */ diff --git a/gcc/config/or1k/or1k.c b/gcc/config/or1k/or1k.c index 5fa5425aa2b..7342d2e5244 100644 --- a/gcc/config/or1k/or1k.c +++ b/gcc/config/or1k/or1k.c @@ -647,7 +647,7 @@ static void or1k_tls_call (rtx dest, rtx arg) { emit_library_call_value (gen_tls_get_addr (), dest, LCT_CONST, - Pmode, arg, Pmode); + Pmode, arg, Pmode, 0); } /* Helper for or1k_legitimize_address_1. Wrap X in an unspec. */ diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index a662de96ac9..f6d2e95eee2 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -927,7 +927,7 @@ hppa_tls_call (rtx arg) ret = gen_reg_rtx (Pmode); emit_library_call_value (gen_tls_get_addr (), ret, - LCT_CONST, Pmode, arg, Pmode); + LCT_CONST, Pmode, arg, Pmode, 0); return ret; } @@ -10214,7 +10214,7 @@ pa_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value) #ifdef HAVE_ENABLE_EXECUTE_STACK emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__enable_execute_stack"), - LCT_NORMAL, VOIDmode, XEXP (m_tramp, 0), Pmode); + LCT_NORMAL, VOIDmode, XEXP (m_tramp, 0), Pmode, 0); #endif } diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index 6350c685a59..0b27562f67d 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -9663,7 +9663,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)" emit_library_call_value (canonicalize_funcptr_for_compare_libfunc, operands[0], LCT_NORMAL, Pmode, - operands[1], Pmode); + operands[1], Pmode, 0); DONE; } diff --git a/gcc/config/pru/pru.c b/gcc/config/pru/pru.c index 37394c5e3b9..787e53b9052 100644 --- a/gcc/config/pru/pru.c +++ b/gcc/config/pru/pru.c @@ -982,7 +982,7 @@ pru_expand_fp_compare (rtx comparison, machine_mode mode) start_sequence (); cmp = emit_library_call_value (libfunc, 0, LCT_CONST, SImode, - op0, op_mode, op1, op_mode); + op0, op_mode, op1, op_mode, 0); insns = get_insns (); end_sequence (); diff --git a/gcc/config/riscv/riscv.h b/gcc/config/riscv/riscv.h index 567c23380fe..09452e6f8b1 100644 --- a/gcc/config/riscv/riscv.h +++ b/gcc/config/riscv/riscv.h @@ -336,7 +336,7 @@ along with GCC; see the file COPYING3. If not see rtx fun, ra; \ ra = get_hard_reg_initial_val (Pmode, RETURN_ADDR_REGNUM); \ fun = gen_rtx_SYMBOL_REF (Pmode, MCOUNT_NAME); \ - emit_library_call (fun, LCT_NORMAL, VOIDmode, ra, Pmode); \ + emit_library_call (fun, LCT_NORMAL, VOIDmode, ra, Pmode, 0); \ } /* All the work done in PROFILE_HOOK, but still required. */ diff --git a/gcc/config/riscv/riscv.md b/gcc/config/riscv/riscv.md index 434e064e095..9d7a5e8ab15 100644 --- a/gcc/config/riscv/riscv.md +++ b/gcc/config/riscv/riscv.md @@ -1527,7 +1527,7 @@ #ifdef ICACHE_FLUSH_FUNC emit_library_call (gen_rtx_SYMBOL_REF (Pmode, ICACHE_FLUSH_FUNC), LCT_NORMAL, VOIDmode, operands[0], Pmode, - operands[1], Pmode, const0_rtx, Pmode); + operands[1], Pmode, const0_rtx, Pmode, 0); #else emit_insn (gen_fence_i ()); #endif diff --git a/gcc/config/rl78/rl78.c b/gcc/config/rl78/rl78.c index 71f67b79e77..5a2fa74ff1d 100644 --- a/gcc/config/rl78/rl78.c +++ b/gcc/config/rl78/rl78.c @@ -4937,7 +4937,7 @@ rl78_emit_libcall (const char *name, enum rtx_code code, { case 2: ret = emit_library_call_value (libcall, NULL_RTX, LCT_CONST, - dmode, operands[1], smode); + dmode, operands[1], smode, 0); equiv = gen_rtx_fmt_e (code, dmode, operands[1]); break; @@ -4945,7 +4945,7 @@ rl78_emit_libcall (const char *name, enum rtx_code code, ret = emit_library_call_value (libcall, NULL_RTX, LCT_CONST, dmode, operands[1], smode, operands[2], - smode); + smode, 0); equiv = gen_rtx_fmt_ee (code, dmode, operands[1], operands[2]); break; diff --git a/gcc/config/rs6000/rs6000-string.c b/gcc/config/rs6000/rs6000-string.c index fe7177f10fd..e99ae4df900 100644 --- a/gcc/config/rs6000/rs6000-string.c +++ b/gcc/config/rs6000/rs6000-string.c @@ -1618,7 +1618,7 @@ expand_compare_loop (rtx operands[]) target, LCT_NORMAL, GET_MODE (target), src1_addr, Pmode, src2_addr, Pmode, - len_rtx, GET_MODE (len_rtx)); + len_rtx, GET_MODE (len_rtx), 0); } /* emit final_label */ @@ -2583,7 +2583,7 @@ expand_strn_compare (rtx operands[], int no_length) emit_library_call_value (XEXP (DECL_RTL (fun), 0), target, LCT_NORMAL, GET_MODE (target), force_reg (Pmode, src1_addr), Pmode, - force_reg (Pmode, src2_addr), Pmode); + force_reg (Pmode, src2_addr), Pmode, 0); } else { @@ -2598,7 +2598,7 @@ expand_strn_compare (rtx operands[], int no_length) target, LCT_NORMAL, GET_MODE (target), force_reg (Pmode, src1_addr), Pmode, force_reg (Pmode, src2_addr), Pmode, - len_rtx, Pmode); + len_rtx, Pmode, 0); } rtx fin_ref = gen_rtx_LABEL_REF (VOIDmode, final_label); @@ -2653,7 +2653,7 @@ expand_strn_compare (rtx operands[], int no_length) tree fun = builtin_decl_explicit (BUILT_IN_STRCMP); emit_library_call_value (XEXP (DECL_RTL (fun), 0), target, LCT_NORMAL, GET_MODE (target), - src1, Pmode, src2, Pmode); + src1, Pmode, src2, Pmode, 0); } else { @@ -2662,7 +2662,7 @@ expand_strn_compare (rtx operands[], int no_length) tree fun = builtin_decl_explicit (BUILT_IN_STRNCMP); emit_library_call_value (XEXP (DECL_RTL (fun), 0), target, LCT_NORMAL, GET_MODE (target), - src1, Pmode, src2, Pmode, len_rtx, Pmode); + src1, Pmode, src2, Pmode, len_rtx, Pmode, 0); } rtx fin_ref = gen_rtx_LABEL_REF (VOIDmode, final_label); diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 07f7cf516ba..361ce68ac07 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -8660,7 +8660,7 @@ rs6000_legitimize_tls_address (rtx addr, enum tls_model model) rtx argreg = gen_rtx_REG (Pmode, 3); emit_insn (gen_rtx_SET (argreg, arg)); global_tlsarg = arg; - emit_library_call_value (tga, dest, LCT_CONST, Pmode, argreg, Pmode); + emit_library_call_value (tga, dest, LCT_CONST, Pmode, argreg, Pmode, 0); global_tlsarg = NULL_RTX; /* Make a note so that the result of this call can be CSEd. */ @@ -8676,7 +8676,7 @@ rs6000_legitimize_tls_address (rtx addr, enum tls_model model) rtx argreg = gen_rtx_REG (Pmode, 3); emit_insn (gen_rtx_SET (argreg, arg)); global_tlsarg = arg; - emit_library_call_value (tga, tmp1, LCT_CONST, Pmode, argreg, Pmode); + emit_library_call_value (tga, tmp1, LCT_CONST, Pmode, argreg, Pmode, 0); global_tlsarg = NULL_RTX; /* Make a note so that the result of this call can be CSEd. */ @@ -13934,7 +13934,7 @@ rs6000_generate_compare (rtx cmp, machine_mode mode) if (!check_nan) dest = emit_library_call_value (libfunc, NULL_RTX, LCT_CONST, - SImode, op0, mode, op1, mode); + SImode, op0, mode, op1, mode, 0); /* The library signals an exception for signalling NaNs, so we need to handle isgreater, etc. by first checking isordered. */ @@ -13950,7 +13950,7 @@ rs6000_generate_compare (rtx cmp, machine_mode mode) /* Test for either value being a NaN. */ gcc_assert (unord_func); unord_dest = emit_library_call_value (unord_func, NULL_RTX, LCT_CONST, - SImode, op0, mode, op1, mode); + SImode, op0, mode, op1, mode, 0); /* Set value (0) if either value is a NaN, and jump to the join label. */ @@ -13969,7 +13969,7 @@ rs6000_generate_compare (rtx cmp, machine_mode mode) /* Do the normal comparison, knowing that the values are not NaNs. */ normal_dest = emit_library_call_value (libfunc, NULL_RTX, LCT_CONST, - SImode, op0, mode, op1, mode); + SImode, op0, mode, op1, mode, 0); emit_insn (gen_cstoresi4 (dest, gen_rtx_fmt_ee (code, SImode, normal_dest, @@ -14297,7 +14297,7 @@ rs6000_expand_float128_convert (rtx dest, rtx src, bool unsigned_p) gcc_assert (libfunc != NULL_RTX); dest2 = emit_library_call_value (libfunc, dest, LCT_CONST, dest_mode, - src, src_mode); + src, src_mode, 0); gcc_assert (dest2 != NULL_RTX); if (!rtx_equal_p (dest, dest2)) @@ -16658,7 +16658,7 @@ output_profile_hook (int labelno ATTRIBUTE_UNUSED) #endif if (NO_PROFILE_COUNTERS) emit_library_call (init_one_libfunc (RS6000_MCOUNT), - LCT_NORMAL, VOIDmode); + LCT_NORMAL, VOIDmode, 0); else { char buf[30]; @@ -16670,7 +16670,7 @@ output_profile_hook (int labelno ATTRIBUTE_UNUSED) fun = gen_rtx_SYMBOL_REF (Pmode, label_name); emit_library_call (init_one_libfunc (RS6000_MCOUNT), - LCT_NORMAL, VOIDmode, fun, Pmode); + LCT_NORMAL, VOIDmode, fun, Pmode, 0); } } else if (DEFAULT_ABI == ABI_DARWIN) @@ -16690,7 +16690,7 @@ output_profile_hook (int labelno ATTRIBUTE_UNUSED) #endif emit_library_call (gen_rtx_SYMBOL_REF (Pmode, mcount_name), LCT_NORMAL, VOIDmode, - gen_rtx_REG (Pmode, caller_addr_regno), Pmode); + gen_rtx_REG (Pmode, caller_addr_regno), Pmode, 0); } } @@ -19042,7 +19042,7 @@ rs6000_trampoline_init (rtx m_tramp, tree fndecl, rtx cxt) addr, Pmode, GEN_INT (rs6000_trampoline_size ()), SImode, fnaddr, Pmode, - ctx_reg, Pmode); + ctx_reg, Pmode, 0); break; } } diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index ad88b6783af..d1197ccbadb 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -8156,7 +8156,7 @@ rtx libfunc = optab_libfunc (neg_optab, mode); rtx target = emit_library_call_value (libfunc, operands[0], LCT_CONST, mode, - operands[1], mode); + operands[1], mode, 0); if (target && !rtx_equal_p (target, operands[0])) emit_move_insn (operands[0], target); diff --git a/gcc/config/rs6000/vsx.md b/gcc/config/rs6000/vsx.md index 1fcc1b03096..17805a5b663 100644 --- a/gcc/config/rs6000/vsx.md +++ b/gcc/config/rs6000/vsx.md @@ -1627,7 +1627,7 @@ rtx target = emit_library_call_value (libfunc, op5, LCT_NORMAL, DImode, op3, DImode, - op4, DImode); + op4, DImode, 0); emit_move_insn (op5, target); } emit_insn (gen_vsx_extract_v2di (op3, op1, GEN_INT (1))); @@ -1640,7 +1640,7 @@ rtx target = emit_library_call_value (libfunc, op3, LCT_NORMAL, DImode, op3, DImode, - op4, DImode); + op4, DImode, 0); emit_move_insn (op3, target); } emit_insn (gen_vsx_concat_v2di (op0, op5, op3)); @@ -1674,7 +1674,7 @@ rtx target = emit_library_call_value (libfunc, op5, LCT_NORMAL, DImode, op3, DImode, - op4, DImode); + op4, DImode, 0); emit_move_insn (op5, target); } emit_insn (gen_vsx_extract_v2di (op3, op1, GEN_INT (1))); @@ -1687,7 +1687,7 @@ rtx target = emit_library_call_value (libfunc, op3, LCT_NORMAL, DImode, op3, DImode, - op4, DImode); + op4, DImode, 0); emit_move_insn (op3, target); } emit_insn (gen_vsx_concat_v2di (op0, op5, op3)); diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index 84c0ea025b4..9f97317873e 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -10116,7 +10116,7 @@ sh_trampoline_init (rtx tramp_mem, tree fndecl, rtx cxt) || (!(TARGET_SH4A || TARGET_SH4_300) && TARGET_USERMODE)) emit_library_call (function_symbol (NULL, "__ic_invalidate", FUNCTION_ORDINARY).sym, - LCT_NORMAL, VOIDmode, tramp, SImode); + LCT_NORMAL, VOIDmode, tramp, SImode, 0); else emit_insn (gen_ic_invalidate_line (tramp)); } diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index aefced85fe1..a22033d67a1 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -3667,12 +3667,12 @@ emit_soft_tfmode_libcall (const char *func_name, int nargs, rtx *operands) if (nargs == 2) emit_library_call (func_sym, LCT_NORMAL, VOIDmode, arg[0], GET_MODE (arg[0]), - arg[1], GET_MODE (arg[1])); + arg[1], GET_MODE (arg[1]), 0); else emit_library_call (func_sym, LCT_NORMAL, VOIDmode, arg[0], GET_MODE (arg[0]), arg[1], GET_MODE (arg[1]), - arg[2], GET_MODE (arg[2])); + arg[2], GET_MODE (arg[2]), 0); if (ret_slot) emit_move_insn (operands[0], ret_slot); @@ -3685,7 +3685,7 @@ emit_soft_tfmode_libcall (const char *func_name, int nargs, rtx *operands) ret = emit_library_call_value (func_sym, operands[0], LCT_NORMAL, GET_MODE (operands[0]), - arg[1], GET_MODE (arg[1])); + arg[1], GET_MODE (arg[1]), 0); if (ret != operands[0]) emit_move_insn (operands[0], ret); @@ -8486,7 +8486,7 @@ sparc_emit_float_lib_cmp (rtx x, rtx y, enum rtx_code comparison) emit_library_call (libfunc, LCT_NORMAL, DImode, XEXP (slot0, 0), Pmode, - XEXP (slot1, 0), Pmode); + XEXP (slot1, 0), Pmode, 0); mode = DImode; } else @@ -8494,7 +8494,7 @@ sparc_emit_float_lib_cmp (rtx x, rtx y, enum rtx_code comparison) libfunc = gen_rtx_SYMBOL_REF (Pmode, qpfunc); emit_library_call (libfunc, LCT_NORMAL, SImode, - x, TFmode, y, TFmode); + x, TFmode, y, TFmode, 0); mode = SImode; } @@ -9985,7 +9985,7 @@ sparc32_initialize_trampoline (rtx m_tramp, rtx fnaddr, rtx cxt) the stack address is accessible. */ #ifdef HAVE_ENABLE_EXECUTE_STACK emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__enable_execute_stack"), - LCT_NORMAL, VOIDmode, XEXP (m_tramp, 0), Pmode); + LCT_NORMAL, VOIDmode, XEXP (m_tramp, 0), Pmode, 0); #endif } @@ -10032,7 +10032,7 @@ sparc64_initialize_trampoline (rtx m_tramp, rtx fnaddr, rtx cxt) the stack address is accessible. */ #ifdef HAVE_ENABLE_EXECUTE_STACK emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__enable_execute_stack"), - LCT_NORMAL, VOIDmode, XEXP (m_tramp, 0), Pmode); + LCT_NORMAL, VOIDmode, XEXP (m_tramp, 0), Pmode, 0); #endif } @@ -10571,13 +10571,13 @@ sparc_profile_hook (int labelno) fun = gen_rtx_SYMBOL_REF (Pmode, MCOUNT_FUNCTION); if (NO_PROFILE_COUNTERS) { - emit_library_call (fun, LCT_NORMAL, VOIDmode); + emit_library_call (fun, LCT_NORMAL, VOIDmode, 0); } else { ASM_GENERATE_INTERNAL_LABEL (buf, "LP", labelno); lab = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf)); - emit_library_call (fun, LCT_NORMAL, VOIDmode, lab, Pmode); + emit_library_call (fun, LCT_NORMAL, VOIDmode, lab, Pmode, 0); } } diff --git a/gcc/config/tilegx/tilegx.c b/gcc/config/tilegx/tilegx.c index 92a16551ac0..4e36a80cad9 100644 --- a/gcc/config/tilegx/tilegx.c +++ b/gcc/config/tilegx/tilegx.c @@ -5051,7 +5051,7 @@ tilegx_trampoline_init (rtx m_tramp, tree fndecl, rtx static_chain) emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__clear_cache"), LCT_NORMAL, VOIDmode, begin_addr, Pmode, - end_addr, Pmode); + end_addr, Pmode, 0); } diff --git a/gcc/config/tilepro/tilepro.c b/gcc/config/tilepro/tilepro.c index 540c6356c08..9de7fd79e47 100644 --- a/gcc/config/tilepro/tilepro.c +++ b/gcc/config/tilepro/tilepro.c @@ -4460,7 +4460,7 @@ tilepro_trampoline_init (rtx m_tramp, tree fndecl, rtx static_chain) emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__clear_cache"), LCT_NORMAL, VOIDmode, begin_addr, Pmode, - end_addr, Pmode); + end_addr, Pmode, 0); } diff --git a/gcc/config/visium/visium.c b/gcc/config/visium/visium.c index 843a9a5c1da..b80ff5277a5 100644 --- a/gcc/config/visium/visium.c +++ b/gcc/config/visium/visium.c @@ -2441,7 +2441,7 @@ expand_block_move_4 (rtx dst, rtx dst_reg, rtx src, rtx src_reg, rtx bytes_rtx) convert_to_mode (TYPE_MODE (sizetype), GEN_INT (bytes >> 2), TYPE_UNSIGNED (sizetype)), - TYPE_MODE (sizetype)); + TYPE_MODE (sizetype), 0); if (rem == 0) return; @@ -2477,7 +2477,7 @@ expand_block_move_2 (rtx dst, rtx dst_reg, rtx src, rtx src_reg, rtx bytes_rtx) convert_to_mode (TYPE_MODE (sizetype), GEN_INT (bytes >> 1), TYPE_UNSIGNED (sizetype)), - TYPE_MODE (sizetype)); + TYPE_MODE (sizetype), 0); if (rem == 0) return; @@ -2501,7 +2501,7 @@ expand_block_move_1 (rtx dst_reg, rtx src_reg, rtx bytes_rtx) convert_to_mode (TYPE_MODE (sizetype), bytes_rtx, TYPE_UNSIGNED (sizetype)), - TYPE_MODE (sizetype)); + TYPE_MODE (sizetype), 0); } /* Generate a call to a library function to set BYTES_RTX bytes of DST with @@ -2520,7 +2520,7 @@ expand_block_set_4 (rtx dst, rtx dst_reg, rtx value_rtx, rtx bytes_rtx) convert_to_mode (TYPE_MODE (sizetype), GEN_INT (bytes >> 2), TYPE_UNSIGNED (sizetype)), - TYPE_MODE (sizetype)); + TYPE_MODE (sizetype), 0); if (rem == 0) return; @@ -2566,7 +2566,7 @@ expand_block_set_2 (rtx dst, rtx dst_reg, rtx value_rtx, rtx bytes_rtx) convert_to_mode (TYPE_MODE (sizetype), GEN_INT (bytes >> 1), TYPE_UNSIGNED (sizetype)), - TYPE_MODE (sizetype)); + TYPE_MODE (sizetype), 0); if (rem == 0) return; @@ -2590,7 +2590,7 @@ expand_block_set_1 (rtx dst_reg, rtx value_rtx, rtx bytes_rtx) convert_to_mode (TYPE_MODE (sizetype), bytes_rtx, TYPE_UNSIGNED (sizetype)), - TYPE_MODE (sizetype)); + TYPE_MODE (sizetype), 0); } /* Expand string/block move operations. @@ -2746,7 +2746,7 @@ visium_trampoline_init (rtx m_tramp, tree fndecl, rtx static_chain) 0x04940000)); emit_library_call (set_trampoline_parity_libfunc, LCT_NORMAL, VOIDmode, - addr, SImode); + addr, SImode, 0); } /* Return true if the current function must have and use a frame pointer. */ @@ -2785,7 +2785,7 @@ visium_profile_hook (void) { visium_frame_needed = true; emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "mcount"), LCT_NORMAL, - VOIDmode); + VOIDmode, 0); } /* A C expression whose value is RTL representing the address in a stack frame diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c index 0a5ecd23352..074bd324b20 100644 --- a/gcc/config/xtensa/xtensa.c +++ b/gcc/config/xtensa/xtensa.c @@ -1374,7 +1374,7 @@ xtensa_expand_nonlocal_goto (rtx *operands) emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__xtensa_nonlocal_goto"), LCT_NORMAL, VOIDmode, containing_fp, Pmode, - goto_handler, Pmode); + goto_handler, Pmode, 0); } @@ -1652,7 +1652,7 @@ xtensa_setup_frame_addresses (void) if (TARGET_WINDOWED_ABI) emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__xtensa_libgcc_window_spill"), - LCT_NORMAL, VOIDmode); + LCT_NORMAL, VOIDmode, 0); } @@ -4100,7 +4100,7 @@ xtensa_trampoline_init (rtx m_tramp, tree fndecl, rtx chain) emit_move_insn (adjust_address (m_tramp, SImode, chain_off), chain); emit_move_insn (adjust_address (m_tramp, SImode, func_off), func); emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__xtensa_sync_caches"), - LCT_NORMAL, VOIDmode, XEXP (m_tramp, 0), Pmode); + LCT_NORMAL, VOIDmode, XEXP (m_tramp, 0), Pmode, 0); } /* Implement TARGET_LEGITIMATE_CONSTANT_P. */ diff --git a/gcc/except.c b/gcc/except.c index 5df0a4c163d..b2db29ce50e 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -1209,7 +1209,7 @@ sjlj_emit_function_enter (rtx_code_label *dispatch_label) } emit_library_call (unwind_sjlj_register_libfunc, LCT_NORMAL, VOIDmode, - XEXP (fc, 0), Pmode); + XEXP (fc, 0), Pmode, 0); seq = get_insns (); end_sequence (); @@ -1273,7 +1273,7 @@ sjlj_emit_function_exit (void) start_sequence (); emit_library_call (unwind_sjlj_unregister_libfunc, LCT_NORMAL, VOIDmode, - XEXP (crtl->eh.sjlj_fc, 0), Pmode); + XEXP (crtl->eh.sjlj_fc, 0), Pmode, 0); seq = get_insns (); end_sequence (); diff --git a/gcc/explow.c b/gcc/explow.c index b838f035870..15ae649c67c 100644 --- a/gcc/explow.c +++ b/gcc/explow.c @@ -1454,7 +1454,7 @@ allocate_dynamic_stack_space (rtx size, unsigned size_align, func = init_one_libfunc ("__morestack_allocate_stack_space"); space = emit_library_call_value (func, target, LCT_NORMAL, Pmode, - ask, Pmode); + ask, Pmode, 0); if (available_label == NULL_RTX) return space; @@ -1681,7 +1681,7 @@ probe_stack_range (HOST_WIDE_INT first, rtx size) plus_constant (Pmode, size, first))); emit_library_call (stack_check_libfunc, LCT_THROW, VOIDmode, - addr, Pmode); + addr, Pmode, 0); } /* Next see if we have an insn to check the stack. */ diff --git a/gcc/expmed.c b/gcc/expmed.c index e7c03fbf92c..a23d9049be0 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -3486,7 +3486,7 @@ expand_mult (machine_mode mode, rtx op0, rtx op1, rtx target, else if (CONST_DOUBLE_AS_INT_P (scalar_op1)) #endif { - int shift = wi::exact_log2 (rtx_mode_t (scalar_op1, mode)); + int shift = wi::exact_log2 (rtx_mode_t (scalar_op1, mode, unsignedp)); /* Perfect power of 2 (other than 1, which is handled above). */ if (shift > 0) return expand_shift (LSHIFT_EXPR, mode, op0, @@ -4199,7 +4199,7 @@ expand_divmod (int rem_flag, enum tree_code code, machine_mode mode, op1_is_constant = CONST_INT_P (op1); if (op1_is_constant) { - wide_int ext_op1 = rtx_mode_t (op1, mode); + wide_int ext_op1 = rtx_mode_t (op1, mode, unsignedp); op1_is_pow2 = (wi::popcount (ext_op1) == 1 || (! unsignedp && wi::popcount (wi::neg (ext_op1)) == 1)); @@ -4341,7 +4341,7 @@ expand_divmod (int rem_flag, enum tree_code code, machine_mode mode, op1_is_constant = CONST_INT_P (op1); if (op1_is_constant) { - wide_int ext_op1 = rtx_mode_t (op1, compute_mode); + wide_int ext_op1 = rtx_mode_t (op1, compute_mode, unsignedp); op1_is_pow2 = (wi::popcount (ext_op1) == 1 || (! unsignedp && wi::popcount (wi::neg (ext_op1)) == 1)); @@ -4389,7 +4389,7 @@ expand_divmod (int rem_flag, enum tree_code code, machine_mode mode, unsigned HOST_WIDE_INT mh, ml; int pre_shift, post_shift; int dummy; - wide_int wd = rtx_mode_t (op1, int_mode); + wide_int wd = rtx_mode_t (op1, int_mode, unsignedp); unsigned HOST_WIDE_INT d = wd.to_uhwi (); if (wi::popcount (wd) == 1) diff --git a/gcc/expr.c b/gcc/expr.c index b97c217e86d..af4f9567d51 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -353,7 +353,7 @@ convert_mode_scalar (rtx to, rtx from, int unsignedp) start_sequence (); value = emit_library_call_value (libcall, NULL_RTX, LCT_CONST, to_mode, - from, from_mode); + from, from_mode, unsignedp); insns = get_insns (); end_sequence (); emit_libcall_block (insns, to, value, @@ -703,7 +703,7 @@ convert_modes (machine_mode mode, machine_mode oldmode, rtx x, int unsignedp) assume that all the bits are significant. */ if (GET_MODE_CLASS (oldmode) != MODE_INT) oldmode = MAX_MODE_INT; - wide_int w = wide_int::from (rtx_mode_t (x, oldmode), + wide_int w = wide_int::from (rtx_mode_t (x, oldmode, unsignedp), GET_MODE_PRECISION (int_mode), unsignedp ? UNSIGNED : SIGNED); return immed_wide_int_const (w, int_mode); diff --git a/gcc/optabs.c b/gcc/optabs.c index 8dd351286cd..a731e2633dc 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -1830,7 +1830,7 @@ expand_binop (machine_mode mode, optab binoptab, rtx op0, rtx op1, if the libcall is cse'd or moved. */ value = emit_library_call_value (libfunc, NULL_RTX, LCT_CONST, mode, - op0, mode, op1x, op1_mode); + op0, mode, op1x, op1_mode, unsignedp); insns = get_insns (); end_sequence (); @@ -2167,7 +2167,7 @@ expand_twoval_binop_libfunc (optab binoptab, rtx op0, rtx op1, libval = emit_library_call_value (libfunc, NULL_RTX, LCT_CONST, libval_mode, op0, mode, - op1, mode); + op1, mode, 0); /* Get the part of VAL containing the value that we want. */ libval = simplify_gen_subreg (mode, libval, libval_mode, targ0 ? 0 : GET_MODE_SIZE (mode)); @@ -3054,7 +3054,7 @@ expand_unop (machine_mode mode, optab unoptab, rtx op0, rtx target, /* Pass 1 for NO_QUEUE so we don't lose any increments if the libcall is cse'd or moved. */ value = emit_library_call_value (libfunc, NULL_RTX, LCT_CONST, outmode, - op0, mode); + op0, mode, unsignedp); insns = get_insns (); end_sequence (); @@ -4041,7 +4041,7 @@ prepare_cmp_insn (rtx x, rtx y, enum rtx_code comparison, rtx size, ret_mode = targetm.libgcc_cmp_return_mode (); result = emit_library_call_value (libfunc, NULL_RTX, LCT_CONST, - ret_mode, x, mode, y, mode); + ret_mode, x, mode, y, mode, unsignedp); /* There are two kinds of comparison routines. Biased routines return 0/1/2, and unbiased routines return -1/0/1. Other parts @@ -4293,7 +4293,7 @@ prepare_float_lib_cmp (rtx x, rtx y, enum rtx_code comparison, start_sequence (); value = emit_library_call_value (libfunc, NULL_RTX, LCT_CONST, - cmp_mode, x, mode, y, mode); + cmp_mode, x, mode, y, mode, 0); insns = get_insns (); end_sequence (); @@ -4935,7 +4935,7 @@ expand_float (rtx to, rtx from, int unsignedp) start_sequence (); value = emit_library_call_value (libfunc, NULL_RTX, LCT_CONST, - GET_MODE (to), from, GET_MODE (from)); + GET_MODE (to), from, GET_MODE (from), unsignedp); insns = get_insns (); end_sequence (); @@ -5127,7 +5127,7 @@ expand_fix (rtx to, rtx from, int unsignedp) start_sequence (); value = emit_library_call_value (libfunc, NULL_RTX, LCT_CONST, - GET_MODE (to), from, GET_MODE (from)); + GET_MODE (to), from, GET_MODE (from), unsignedp); insns = get_insns (); end_sequence (); @@ -5219,7 +5219,7 @@ expand_fixed_convert (rtx to, rtx from, int uintp, int satp) start_sequence (); value = emit_library_call_value (libfunc, NULL_RTX, LCT_CONST, to_mode, - from, from_mode); + from, from_mode, uintp); insns = get_insns (); end_sequence (); @@ -6205,7 +6205,7 @@ maybe_emit_sync_lock_test_and_set (rtx target, rtx mem, rtx val, addr = convert_memory_address (ptr_mode, XEXP (mem, 0)); return emit_library_call_value (libfunc, NULL_RTX, LCT_NORMAL, mode, addr, ptr_mode, - val, mode); + val, mode, 0); } } @@ -6513,7 +6513,7 @@ expand_atomic_compare_and_swap (rtx *ptarget_bool, rtx *ptarget_oval, rtx addr = convert_memory_address (ptr_mode, XEXP (mem, 0)); rtx target = emit_library_call_value (libfunc, NULL_RTX, LCT_NORMAL, mode, addr, ptr_mode, - expected, mode, desired, mode); + expected, mode, desired, mode, 0); emit_move_insn (target_oval, target); /* Compute the boolean return value only if requested. */ @@ -6584,7 +6584,7 @@ expand_mem_thread_fence (enum memmodel model) else if (targetm.have_memory_barrier ()) emit_insn (targetm.gen_memory_barrier ()); else if (synchronize_libfunc != NULL_RTX) - emit_library_call (synchronize_libfunc, LCT_NORMAL, VOIDmode); + emit_library_call (synchronize_libfunc, LCT_NORMAL, VOIDmode, 0); else expand_memory_blockage (); } @@ -7100,7 +7100,7 @@ expand_atomic_fetch_op (rtx target, rtx mem, rtx val, enum rtx_code code, { rtx addr = convert_memory_address (ptr_mode, XEXP (mem, 0)); result = emit_library_call_value (libfunc, NULL, LCT_NORMAL, mode, - addr, ptr_mode, val, mode); + addr, ptr_mode, val, mode, 0); if (!unused_result && fixup) result = expand_simple_binop (mode, code, result, val, target, diff --git a/gcc/rtl.h b/gcc/rtl.h index eb12d61e140..58441af4ac7 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -2237,10 +2237,27 @@ struct address_info { enum rtx_code base_outer_code; }; -/* This is used to bundle an rtx and a mode together so that the pair +template +struct Tuple + { + T1 first; + T2 second; + T3 third; + Tuple(T1 f, T2 s, T3 t=0) + { + first = f; + second = s; + third = t; + } + }; + +/* This is used to bundle an rtx, a mode and unsigned_p together so that the Tuple can be used with the wi:: routines. If we ever put modes into rtx integer constants, this should go away and then just pass an rtx in. */ -typedef std::pair rtx_mode_t; +typedef Tuple rtx_mode_t; +#define GET_FIRST(x) x.first +#define GET_SECOND(x) x.second +#define GET_THIRD(x) x.third namespace wi { @@ -2261,7 +2278,7 @@ namespace wi inline unsigned int wi::int_traits ::get_precision (const rtx_mode_t &x) { - return GET_MODE_PRECISION (as_a (x.second)); + return GET_MODE_PRECISION (as_a (GET_SECOND(x))); } inline wi::storage_ref @@ -2270,25 +2287,25 @@ wi::int_traits ::decompose (HOST_WIDE_INT *, const rtx_mode_t &x) { gcc_checking_assert (precision == get_precision (x)); - switch (GET_CODE (x.first)) + switch (GET_CODE (GET_FIRST(x))) { case CONST_INT: if (precision < HOST_BITS_PER_WIDE_INT) /* Nonzero BImodes are stored as STORE_FLAG_VALUE, which on many targets is 1 rather than -1. */ - gcc_checking_assert (INTVAL (x.first) - == sext_hwi (INTVAL (x.first), precision) - || (x.second == BImode && INTVAL (x.first) == 1)); + gcc_checking_assert (INTVAL (GET_FIRST(x)) + == sext_hwi (INTVAL (GET_FIRST(x)), precision) + || (GET_SECOND(x) == BImode && INTVAL (GET_FIRST(x)) == 1)); - return wi::storage_ref (&INTVAL (x.first), 1, precision); + return wi::storage_ref (&INTVAL (GET_FIRST(x)), 1, precision); case CONST_WIDE_INT: - return wi::storage_ref (&CONST_WIDE_INT_ELT (x.first, 0), - CONST_WIDE_INT_NUNITS (x.first), precision); + return wi::storage_ref (&CONST_WIDE_INT_ELT (GET_FIRST(x), 0), + CONST_WIDE_INT_NUNITS (GET_FIRST(x)), precision); #if TARGET_SUPPORTS_WIDE_INT == 0 case CONST_DOUBLE: - return wi::storage_ref (&CONST_DOUBLE_LOW (x.first), 2, precision); + return wi::storage_ref (&CONST_DOUBLE_LOW (GET_FIRST(x)), 2, precision); #endif default: @@ -4168,27 +4185,28 @@ extern rtx emit_library_call_value_1 (int, rtx, rtx, enum libcall_type, of arguments. In each case the argument value is followed by its mode. */ inline void -emit_library_call (rtx fun, libcall_type fn_type, machine_mode outmode) +emit_library_call (rtx fun, libcall_type fn_type, machine_mode outmode, int) { emit_library_call_value_1 (0, fun, NULL_RTX, fn_type, outmode, 0, NULL); } inline void emit_library_call (rtx fun, libcall_type fn_type, machine_mode outmode, - rtx arg1, machine_mode arg1_mode) + rtx arg1, machine_mode arg1_mode, int unsignedp) { - rtx_mode_t args[] = { rtx_mode_t (arg1, arg1_mode) }; + rtx_mode_t args[] = { rtx_mode_t (arg1, arg1_mode, unsignedp) }; emit_library_call_value_1 (0, fun, NULL_RTX, fn_type, outmode, 1, args); } inline void emit_library_call (rtx fun, libcall_type fn_type, machine_mode outmode, rtx arg1, machine_mode arg1_mode, - rtx arg2, machine_mode arg2_mode) + rtx arg2, machine_mode arg2_mode, + int unsignedp) { rtx_mode_t args[] = { - rtx_mode_t (arg1, arg1_mode), - rtx_mode_t (arg2, arg2_mode) + rtx_mode_t (arg1, arg1_mode, unsignedp), + rtx_mode_t (arg2, arg2_mode, unsignedp) }; emit_library_call_value_1 (0, fun, NULL_RTX, fn_type, outmode, 2, args); } @@ -4197,12 +4215,13 @@ inline void emit_library_call (rtx fun, libcall_type fn_type, machine_mode outmode, rtx arg1, machine_mode arg1_mode, rtx arg2, machine_mode arg2_mode, - rtx arg3, machine_mode arg3_mode) + rtx arg3, machine_mode arg3_mode, + int unsignedp) { rtx_mode_t args[] = { - rtx_mode_t (arg1, arg1_mode), - rtx_mode_t (arg2, arg2_mode), - rtx_mode_t (arg3, arg3_mode) + rtx_mode_t (arg1, arg1_mode, unsignedp), + rtx_mode_t (arg2, arg2_mode, unsignedp), + rtx_mode_t (arg3, arg3_mode, unsignedp) }; emit_library_call_value_1 (0, fun, NULL_RTX, fn_type, outmode, 3, args); } @@ -4212,13 +4231,14 @@ emit_library_call (rtx fun, libcall_type fn_type, machine_mode outmode, rtx arg1, machine_mode arg1_mode, rtx arg2, machine_mode arg2_mode, rtx arg3, machine_mode arg3_mode, - rtx arg4, machine_mode arg4_mode) + rtx arg4, machine_mode arg4_mode, + int unsignedp) { rtx_mode_t args[] = { - rtx_mode_t (arg1, arg1_mode), - rtx_mode_t (arg2, arg2_mode), - rtx_mode_t (arg3, arg3_mode), - rtx_mode_t (arg4, arg4_mode) + rtx_mode_t (arg1, arg1_mode, unsignedp), + rtx_mode_t (arg2, arg2_mode, unsignedp), + rtx_mode_t (arg3, arg3_mode, unsignedp), + rtx_mode_t (arg4, arg4_mode, unsignedp) }; emit_library_call_value_1 (0, fun, NULL_RTX, fn_type, outmode, 4, args); } @@ -4229,7 +4249,7 @@ emit_library_call (rtx fun, libcall_type fn_type, machine_mode outmode, inline rtx emit_library_call_value (rtx fun, rtx value, libcall_type fn_type, - machine_mode outmode) + machine_mode outmode, int) { return emit_library_call_value_1 (1, fun, value, fn_type, outmode, 0, NULL); } @@ -4237,9 +4257,10 @@ emit_library_call_value (rtx fun, rtx value, libcall_type fn_type, inline rtx emit_library_call_value (rtx fun, rtx value, libcall_type fn_type, machine_mode outmode, - rtx arg1, machine_mode arg1_mode) + rtx arg1, machine_mode arg1_mode, + int unsignedp) { - rtx_mode_t args[] = { rtx_mode_t (arg1, arg1_mode) }; + rtx_mode_t args[] = { rtx_mode_t (arg1, arg1_mode, unsignedp) }; return emit_library_call_value_1 (1, fun, value, fn_type, outmode, 1, args); } @@ -4247,11 +4268,12 @@ inline rtx emit_library_call_value (rtx fun, rtx value, libcall_type fn_type, machine_mode outmode, rtx arg1, machine_mode arg1_mode, - rtx arg2, machine_mode arg2_mode) + rtx arg2, machine_mode arg2_mode, + int unsignedp) { rtx_mode_t args[] = { - rtx_mode_t (arg1, arg1_mode), - rtx_mode_t (arg2, arg2_mode) + rtx_mode_t (arg1, arg1_mode, unsignedp), + rtx_mode_t (arg2, arg2_mode, unsignedp) }; return emit_library_call_value_1 (1, fun, value, fn_type, outmode, 2, args); } @@ -4261,12 +4283,13 @@ emit_library_call_value (rtx fun, rtx value, libcall_type fn_type, machine_mode outmode, rtx arg1, machine_mode arg1_mode, rtx arg2, machine_mode arg2_mode, - rtx arg3, machine_mode arg3_mode) + rtx arg3, machine_mode arg3_mode, + int unsignedp) { rtx_mode_t args[] = { - rtx_mode_t (arg1, arg1_mode), - rtx_mode_t (arg2, arg2_mode), - rtx_mode_t (arg3, arg3_mode) + rtx_mode_t (arg1, arg1_mode, unsignedp), + rtx_mode_t (arg2, arg2_mode, unsignedp), + rtx_mode_t (arg3, arg3_mode, unsignedp) }; return emit_library_call_value_1 (1, fun, value, fn_type, outmode, 3, args); } @@ -4277,13 +4300,14 @@ emit_library_call_value (rtx fun, rtx value, libcall_type fn_type, rtx arg1, machine_mode arg1_mode, rtx arg2, machine_mode arg2_mode, rtx arg3, machine_mode arg3_mode, - rtx arg4, machine_mode arg4_mode) + rtx arg4, machine_mode arg4_mode, + int unsignedp) { rtx_mode_t args[] = { - rtx_mode_t (arg1, arg1_mode), - rtx_mode_t (arg2, arg2_mode), - rtx_mode_t (arg3, arg3_mode), - rtx_mode_t (arg4, arg4_mode) + rtx_mode_t (arg1, arg1_mode, unsignedp), + rtx_mode_t (arg2, arg2_mode, unsignedp), + rtx_mode_t (arg3, arg3_mode, unsignedp), + rtx_mode_t (arg4, arg4_mode, unsignedp) }; return emit_library_call_value_1 (1, fun, value, fn_type, outmode, 4, args); } diff --git a/gcc/testsuite/gcc.target/powerpc/pr88877.c b/gcc/testsuite/gcc.target/powerpc/pr88877.c new file mode 100644 index 00000000000..0bc69c4be0f --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr88877.c @@ -0,0 +1,9 @@ +/* { dg-do compile { target { powerpc64*-*-* } } } */ +/* { dg-options "-msoft-float -m64" } */ +/* { dg-final { scan-assembler "lwz" } } */ +/* { dg-final { scan-assembler-not "lwa" } } */ + +void foo(){ +unsigned int x=-1; +double d=x; +}