From patchwork Sat Jun 13 10:27:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kamlesh kumar X-Patchwork-Id: 1308635 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=mfYI1fmC; 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 49kYhH0Ffxz9sRK for ; Sat, 13 Jun 2020 20:27:57 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E3046386F809; Sat, 13 Jun 2020 10:27:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E3046386F809 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1592044073; bh=8JWMFa4OkVYeD62pvFBpXIU2uTtjx3S6qDs/982gEBE=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=mfYI1fmCCDyAbobeX6D2r6xMZOkb+O5uXU6g/4LcHq4gCzcAwcKZurAPQuIaht3S0 aKG4ou9yRC4glYfred2mUjXyLL5VLVc2t6o6l6ZG1mAkz3kTiQrotdr7QJzw+F/pp6 /EtAsrZipVrJZ+IpTZX2F2hkPX/aMEXuW8u+3kBE= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by sourceware.org (Postfix) with ESMTPS id 0206E3851C09 for ; Sat, 13 Jun 2020 10:27:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0206E3851C09 Received: by mail-pg1-x544.google.com with SMTP id t7so5329210pgt.3 for ; Sat, 13 Jun 2020 03:27:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=8JWMFa4OkVYeD62pvFBpXIU2uTtjx3S6qDs/982gEBE=; b=BO2+i/zIf7ALVZkwAviM96lGOR2a1GYBwHMCBxMyT3AkdLl4syMXoApdTYZghrOPvY YzPNrKxNHQjepcc8qb2WFyVM34d0ekM6L6Yel/gip6hAmgUK+ExlIzM/MQoSOmY43BqF Jzk/2MWcD4CtifEp72lLYT28ckC8MDiuSws9E4Hfq9pkgEoAYXaxILdDapHiKZWar9Nu ygkgYAl3jgCPd0ZgtnULKxj2Nrh2f2oSC1hmeUhcfjjYEsyJpQ9Rn4D1bKeL8N2/l631 JAH3Z9yn/0yMdsDd5t39Jyiqu8E2TSBM7giX92L3pBUKiP1MPV5tmzKGwJROjPXzIzpv EGLg== X-Gm-Message-State: AOAM530V/Er/myqIEFM5NgPOev97kBoSsY+IU8n81NozmiyWsPKz0C/l AgflOJ/Qaep5mVJfSYM74z3WvjndjFc= X-Google-Smtp-Source: ABdhPJw+QiEIGED8AXe+QDffF+ebzYxWkMMZToxjCBFHl+X652XhD1o7fcL7mc/B/nYvlw2sADAYXw== X-Received: by 2002:a63:c042:: with SMTP id z2mr14223703pgi.231.1592044068897; Sat, 13 Jun 2020 03:27:48 -0700 (PDT) Received: from localhost.localdomain ([49.204.85.206]) by smtp.gmail.com with ESMTPSA id y7sm8422567pfq.43.2020.06.13.03.27.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Jun 2020 03:27:47 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [PATCH] Defined libcall_arg_t Date: Sat, 13 Jun 2020 15:57:37 +0530 Message-Id: <1592044057-2607-1-git-send-email-kamleshbhalui@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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: kamlesh kumar Reply-To: Kamlesh Kumar Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" This is first patch where I have just defined a struct libcall_arg_t which contains three member rtx, machine_mode and a boolean unsigned_p and will be used in passing args in emit_library_[call/value] functions. Once this patch is approved then i will create second patch in which arg type libcall_arg_t will be propogated on all instances needed. Then final patch which will fix the actual problem reported in PR88877. ChangeLog Entry: 2020-06-13 Kamlesh Kumar * rtl.h (libcall_arg_t): Defined. diff --git a/gcc/rtl.h b/gcc/rtl.h index 0872cc4..c023ff0 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -2238,6 +2238,18 @@ struct address_info { enum rtx_code base_outer_code; }; +/* This is used for passing args in emit_library_* functions */ +typedef struct libcall_arg { + rtx value; + machine_mode mode; + bool unsigned_p; + libcall_arg (rtx v, machine_mode m, bool u) { + value = v; + mode = m; + unsigned_p = u; + } +} libcall_arg_t; + /* This is used to bundle an rtx and a mode together so that the pair 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. */