From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 233133856082 for ; Wed, 25 May 2022 12:39:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 233133856082 Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-113-JDlXTVQdOvyyIFmcJw0FjQ-1; Wed, 25 May 2022 08:39:04 -0400 X-MC-Unique: JDlXTVQdOvyyIFmcJw0FjQ-1 Received: by mail-qv1-f70.google.com with SMTP id fw9-20020a056214238900b0043522aa5b81so15496663qvb.21 for ; Wed, 25 May 2022 05:39:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=FgVZ4xsfEwSBYN1IiDcWZYf2QvsIeO2VxSul4D5XQxk=; b=7eKXGOYKxcIh8hXhDVtFmqc4Yy/I2aB4Z2sxZ4mS7OvVErjlAc4A67DB8mYP/iTUed HLqyH9IhXEupOC/DyNvPjNm7sOF6q/TGXz/FduIYWq7vFdNDbsvcNXrDEE08W7XSJxW4 uBCK9EJYsvSYlrdebyVA5dUkAKKnqKSb11oRWCIqZTSF7w8hz+nif4da9LXcrW9cIWRm qzjjEBREK4UHOVcHrcUlRTydr9tb/tb+wht9yNRj3vlJFLqSKd3fHq7b6PzQk74AlSC3 nCCTYEjygRFs17zhWlyhBErKSIn1JTpiOeZoE670SeZhfNFQ3H4IzbXQAG1fdD4Jel+8 YjIw== X-Gm-Message-State: AOAM5324c3LBpwQHjsaQFSB4pOiW862KuhhJPGH1UNPqJuF/W8h49pPP FzawJDyHjPp/YGfBYvgo8Z2lo84/pqU8OzfpVSIHK/+QpWeOmZbD+Hns4WnCXO7UTTxmgySow50 pbeocz20= X-Received: by 2002:a05:620a:3181:b0:6a3:742b:a7d0 with SMTP id bi1-20020a05620a318100b006a3742ba7d0mr11599749qkb.156.1653482343895; Wed, 25 May 2022 05:39:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwqo/BGAgIc14YzyUOH6maC2O7p/KXY5uGjARBXxoOU9QKKUIhcS9Nj7frAaJ86yUbwGEjnQ== X-Received: by 2002:a05:620a:3181:b0:6a3:742b:a7d0 with SMTP id bi1-20020a05620a318100b006a3742ba7d0mr11599733qkb.156.1653482343635; Wed, 25 May 2022 05:39:03 -0700 (PDT) Received: from t14s.localdomain (c-73-69-212-193.hsd1.nh.comcast.net. [73.69.212.193]) by smtp.gmail.com with ESMTPSA id bc10-20020a05622a1cca00b002f39b99f6a2sm1325256qtb.60.2022.05.25.05.39.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 May 2022 05:39:02 -0700 (PDT) Message-ID: <584fb8cfee848558abab42d799931ab262ae56d6.camel@redhat.com> Subject: Re: Adding log files to gcc dump and adding testcase-rtl From: David Malcolm To: RICHU NORMAN Cc: gcc@gcc.gnu.org Date: Wed, 25 May 2022 08:39:01 -0400 In-Reply-To: References: User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2022 12:39:08 -0000 On Wed, 2022-05-25 at 16:32 +0530, RICHU NORMAN wrote: > This is great, thank you so much! You're welcome. > I am also looking for support regarding adding instructions for the > target > machine. That's something I've not done (my expertise is mostly in the frontends and diagnostics). With that caveat, I believe the official documentation is here: https://gcc.gnu.org/onlinedocs/gccint/Machine-Desc.html FWIW one of my colleagues wrote a series of posts about how to add an entirely new CPU to the GNU toolchain here (originally called "ggx", but now "moxie"): http://atgreen.github.io/ggx/ though that's from 2008 so might be out-of-date, and covers the whole toolchain, not just GCC, so might be overwhelming. Hope this is helpful Dave > > > > On Wed, May 25, 2022 at 4:14 PM David Malcolm > wrote: > > > On Wed, 2022-05-25 at 10:25 +0530, RICHU NORMAN wrote: > > > Hi, > > > I am a beginner in gcc. I am trying to add an instruction to riscv- > > > gcc.It > > > would be helpful could help with a few tips . > > > > Hi Richu - welcome to GCC development. > > > > FWIW I've written a guide for new GCC contributors which you might > > find > > helpful: > >   https://gcc-newbies-guide.readthedocs.io/en/latest/index.html > > > > Caveat: I'm much more familiar with the frontends/diagnostics, rather > > than the backends/RTL, so there may be a "frontend" bias in that > > guide. > > > > > 1.How to write comments to rtl or create a custom log file to log > > > comments > > > to rtl dump? > > > 2.How to run testsuite ? > > > 3.Is there a way to directly run an rtl test case? Like giving rtl > > > input > > > and checking the generated asm.(Like in the attachment which is > > > posted in > > > bugzilla[ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82815 ]) > > > Please suggest a way to run the gcc-testsuite with these cases. Pfa > > > > I wrote some notes on dealing with the testsuite, and on running > > individual cases here: > > > > > > https://gcc-newbies-guide.readthedocs.io/en/latest/working-with-the-testsuite.html > > > > Hope this is helpful; good luck > > Dave > > > > >