From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from heron.birch.relay.mailchannels.net (heron.birch.relay.mailchannels.net [23.83.209.82]) by sourceware.org (Postfix) with ESMTPS id 8849B3858D39 for ; Mon, 23 Oct 2023 19:27:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8849B3858D39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=eagercon.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=eagercon.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8849B3858D39 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=23.83.209.82 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1698089258; cv=pass; b=Wwl0tDhd1m1KAjg1tRiwzxIuPO8xo/PjWGCm+KMQ9LoYqqykGX+RDFAOYsXaHN3VPd4tsGr3vN9HHu7HH9AXZSB1W3F5+BAypN8vxU6bzvy6LsskQ7TzW6cyAMMc62VY0Vj0bg3N/qOFOoNWfaT6HK5FeY2xJW+u0NV2xTVOeoo= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1698089258; c=relaxed/simple; bh=Gip1MJWlMGEPPZRI5eDqP5owbyaJfOx9ZPTI50osS9w=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=fIxy8jMsE88lD9JIK55gZh5naQnfjO3u+2+pxrB+NfvptLtCpKGKqjA2e1uXVj7MshWwWBstp1+ApvYDPvhbpGxBuuUPyDoghosXqLKvQRGJJdMvL2nNIoPSvw7mfRwqFtCPY98a+bF3HkkQVj2ykZMvS5n7iE5Dhc5loPfxBtc= ARC-Authentication-Results: i=2; server2.sourceware.org X-Sender-Id: dreamhost|x-authsender|eager@eagerm.com Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 34FBF2C0AD5; Mon, 23 Oct 2023 19:27:35 +0000 (UTC) Received: from pdx1-sub0-mail-a246.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 6F9B12C1061; Mon, 23 Oct 2023 19:27:34 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1698089254; a=rsa-sha256; cv=none; b=kq15RCYNtIHnecbjiwnxJ6xRbQNYJJBSniONTyMletffmL1oCl8qQVrlj0EBdxqwm2FG2F wnAW8W52W2LR8o1daAGZ8Obzdke/wUo+IqFuzc4QfGRF/qXFtdd7/nHSPQBWQvI//e+veS 3kzsrHYiOszjjxDI6ucBiINSSjxrOIfr0u3fVdz1EtTz3+mFJ3SzKcgTAjBN6sZ0BXb5Cl 9WXaLEU1jVu0rrLvd4rn0i35BGi842Hq/IBPXA8YQrgUumrLcY+/drIAEfxmtC2jX9J9Yi VnL9pZxsmtFkF11eio9cDUIC79eVueZILW4vLAU4vwmqJrCRV3gmrTSc7IMapA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1698089254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=OzKyJjA7+wOyKj01CnLkCKazPK6Y89HizdQmRmMMAjE=; b=RGTavnCj+j/x/UsLNUXPVM86NYYJ5WtvgwGNjq2XF4nP+NSxHFFfStml0SBgsSFUwr5UnO c65nI6BQqdd7bJEXDZ+Xya6f6LNdm89QNxCHyO308sq7cvXVoGyXccXT+MaIvLrzoUDf1K b5eRmcMJyrjg44EL6Xsfqmdy4Rc05ZElpieUu11LDzXOUFdzplL9UXlSeR477NwdYxjeIQ MxbrxzQxPg/iAVIfe7cRE4BIi8nh1YrLaw8v7vyIdY3uhh3g2FxOaqAHw+iN9slPO2zxc4 08Emw6bP3sGlI6vScc4903t26RBEGwmFllDIoGftALzCNhxN6M5UMAFQbCkG8w== ARC-Authentication-Results: i=1; rspamd-6557c4b887-88gdb; auth=pass smtp.auth=dreamhost smtp.mailfrom=eager@eagercon.com X-Sender-Id: dreamhost|x-authsender|eager@eagerm.com X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|eager@eagerm.com X-MailChannels-Auth-Id: dreamhost X-Eyes-Spicy: 57d0867c3ad4f2e7_1698089255037_2974283286 X-MC-Loop-Signature: 1698089255036:4191114162 X-MC-Ingress-Time: 1698089255036 Received: from pdx1-sub0-mail-a246.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.123.152.107 (trex/6.9.2); Mon, 23 Oct 2023 19:27:35 +0000 Received: from [192.168.20.10] (c-73-170-238-207.hsd1.ca.comcast.net [73.170.238.207]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: eager@eagerm.com) by pdx1-sub0-mail-a246.dreamhost.com (Postfix) with ESMTPSA id 4SDlZY6DYtzFg; Mon, 23 Oct 2023 12:27:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eagercon.com; s=dreamhost; t=1698089254; bh=OzKyJjA7+wOyKj01CnLkCKazPK6Y89HizdQmRmMMAjE=; h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding; b=jLUBVMo/6vfz91kfMp+wN+Ij67ul5ebTd8FRYN8bGHo2/L0bix8FKRk3HAjd9xzUB jtHc8/p+sanGCeZBwepXEa2/mfP1hiz4BQMmgt02iIOwmarK6M+WoEy8T7T/4F47b5 s/EjDhy79w4qqVgymNlgGm2FY38tipdxIeq/hM0Ca7mhBwwRFM5vI5Mtw4JNmL4mV5 DBHIFZIlibFcRa3daxmA8ArIg0vLLqnCkNqFsS6i7VVtyoYllpHxHQHLSkaxREJpfP V/eSa8nyOO5syhOxWFRqlPxSVIuYS5935QMiyTndtvH1W/B4+zxCk8cNURAMtQTcqF xLukc253NHWEQ== Message-ID: Date: Mon, 23 Oct 2023 12:27:33 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 1/1] gcc: config: microblaze: fix cpu version check Content-Language: en-US To: "Frager, Neal" Cc: "gcc-patches@gcc.gnu.org" , "eager@eagerm.com" , "Erkiaga Elorza, Ibai" , "Mekala, Nagaraju" , "Hatle, Mark" , "Mutyala, Sadanand" , "Nali, Appa Rao" , "Hunsigida, Vidhumouli" , "luca.ceresoli@bootlin.com" References: <4891E7AE-9DCC-4FFC-B07C-AE255FDFD3CB@amd.com> From: Michael Eager In-Reply-To: <4891E7AE-9DCC-4FFC-B07C-AE255FDFD3CB@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 10/23/23 11:37, Frager, Neal wrote: > > > >> Le 23 oct. 2023 à 18:40, Michael Eager a écrit : >> >> On 10/22/23 22:48, Neal Frager wrote: >>> There is a microblaze cpu version 10.0 included in versal. If the >>> minor version is only a single digit, then the version comparison >>> will fail as version 10.0 will appear as 100 compared to version >>> 6.00 or 8.30 which will calculate to values 600 and 830. >>> The issue can be seen when using the '-mcpu=10.0' option. >>> With this fix, versions with a single digit minor number such as >>> 10.0 will be calculated as greater than versions with a smaller >>> major version number, but with two minor version digits. >>> By applying this fix, several incorrect warning messages will no >>> longer be printed when building the versal plm application, such >>> as the warning message below: >>> warning: '-mxl-multiply-high' can be used only with '-mcpu=v6.00.a' or greater >>> Signed-off-by: Neal Frager >>> --- >>> gcc/config/microblaze/microblaze.cc | 164 +++++++++++++--------------- >>> 1 file changed, 76 insertions(+), 88 deletions(-) >> >> Please add a test case. >> >> -- >> Michael Eager > > Hi Michael, > > Would you mind helping me understand how to make a gcc test case for this patch? > > This patch does not change the resulting binaries of a microblaze gcc build. The output will be the same with our without the patch, so I do not having anything in the binary itself to verify. > > All that happens is false warning messages will not be printed when building with ‘-mcpu=10.0’. Is there a way to test for warning messages? > > In any case, please do not commit v1 of this patch. I am going to work on making a v2 based on Mark’s feedback. You can create a test case which passes the -mcpu=10.0 and other options to GCC and verify that the message is not generated after the patch is applied. You can make all GCC warnings into errors with the "-Werror" option. This means that the compile will fail if the warning is issued. Take a look at gcc/testsuite/gcc.target/aarch64/bti-1.c for an example of using { dg-options "" } to specify command line options. There is a test suite option (dg-warning) which checks that a particular source line generates a warning message, but it isn't clear whether is is possible to check that a warning is not issued. -- Michael Eager