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 4452F385E012 for ; Wed, 25 May 2022 10:54:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4452F385E012 Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-101-qtxp-ieKM82olpcs0Ifbkw-1; Wed, 25 May 2022 06:54:04 -0400 X-MC-Unique: qtxp-ieKM82olpcs0Ifbkw-1 Received: by mail-qt1-f197.google.com with SMTP id r22-20020ac84256000000b002f91745ec68so12287614qtm.2 for ; Wed, 25 May 2022 03:54: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:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=bz15Ty5wt72tpeUhOc5dcBHf2qK9w7pv5RSu1oeSCUw=; b=Mp2TkzMlxkNN1/KDAGlkDBzOyY9SYk9dx5hBUz0ygTKD5AIpTzvh3O32oxtOLggxll UD9c/N65rGPI2wYdgVIimiq2BPs05nbvvTqZJ6aPJgLsUb497hWh9++S4Z/Q+qJicFDA qUbGcw/mHlToCbVuRn4n4GAZ/D62WFpr20iXMB+qES/H5ywI4V5q6Fq5BuaT5hDhmMQ+ A8vm6mazCfl7IdHuQ7LvcDzwF6dVhxj5W9I13D/5amVuwjqdTScQTa6GJ5BEdHgf/lmS 6rZfqkofFT9XwtHDG15dw17G2q+hsDZ+9c+LguC0vxczs27pXshSKcJrNuPYFb2vcBN1 6gIg== X-Gm-Message-State: AOAM532AbDccJbFhAHRQctpeW69tvglzuBJ0S7wJI3oUcBIOZ9NCYKT9 24lzHHXQmCxVFwII156at+5unmd0UPP67cP+c0uK8NyAoohb4je+zmdF5dM+uvrFjK7aBt4rSTy g7K8NPOM= X-Received: by 2002:a05:6214:2588:b0:45a:fe76:9071 with SMTP id fq8-20020a056214258800b0045afe769071mr25439185qvb.43.1653476043754; Wed, 25 May 2022 03:54:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynGNDnqkEa9Oykg2SuThvgx/LU+zOwrUoWUJlRm5n6+j6VPIBoveF9IW37+t7gM0TDNWX/5g== X-Received: by 2002:a05:6214:2588:b0:45a:fe76:9071 with SMTP id fq8-20020a056214258800b0045afe769071mr25439171qvb.43.1653476043509; Wed, 25 May 2022 03:54: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 bs5-20020ac86f05000000b002f91849bf20sm1178262qtb.36.2022.05.25.03.54.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 May 2022 03:54:02 -0700 (PDT) Message-ID: <989922e7365d160a04cdc819bc11fa0af15d8263.camel@redhat.com> Subject: Re: Adding log files to gcc dump and adding testcase-rtl From: David Malcolm To: RICHU NORMAN , gcc@gcc.gnu.org Date: Wed, 25 May 2022 06:54: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 10:54:07 -0000 On Wed, 2022-05-25 at 06:44 -0400, 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 Looks like that bug relates to a bug in the __RTL reading code (which I wrote; sorry!). There are some notes on running cc1 under the debugger in my guide here: https://gcc-newbies-guide.readthedocs.io/en/latest/debugging.html which should let you put a breakpoint on the relevant code and step through it. Some note on __RTL testcases: you will generally want to have a "startswith" clause on the __RTL to indicate which compilation pass the RTL was saved at, since RTL goes through several stages in the backend. "git grep __RTL" should show some examples of existing __RTL-based testcases. See also: https://gcc.gnu.org/onlinedocs/gccint/RTL-Tests.html Dave