From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from seahorse.cherry.relay.mailchannels.net (seahorse.cherry.relay.mailchannels.net [23.83.223.161]) by sourceware.org (Postfix) with ESMTPS id 0B3C93858CDA for ; Tue, 24 Oct 2023 14:57:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0B3C93858CDA 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 0B3C93858CDA Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=23.83.223.161 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1698159473; cv=pass; b=cZNUDi5xdKMU8l37Ny0JF2W3xaix2yH/U0fNjKMyEwzmWpQVJlcT8Gjrf5YEYt+v1tTIb9YkRLkldkMn5aC6e53Q5SwsUteL4An+eb9fLZvl9QnEX+fjBYbwMntT7Kbrz0NFaR+ZvSe1YSv1BIZzvrJndxoFp+JXFwuTg9TH3P0= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1698159473; c=relaxed/simple; bh=m2jrwADXjEhnOzw3TY2Duob+3ufmuPErhhTAy11s/NA=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=t/EZ60lZjMjyF8nQ/Kr9BPHWh0J9cmDSgOWFdNcatOS/cIxwa01I8HuCV6rEhlBaWN8EF1/UukDShVCCXe/KcQIvh30ChAhUby/sRu4kf/+F9VuHXqhCRTWAHExKyAfL3kC84GcUvkMdZKixHKzimRe8/V2NK0uC7SlyCBJWbV4= 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 7DCA941DDE; Tue, 24 Oct 2023 14:57:49 +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 0595841E20; Tue, 24 Oct 2023 14:57:48 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1698159469; a=rsa-sha256; cv=none; b=25tDf5GvmaZvWknQ5vflJVq+wVCf18nQV0uwreBHqhCB29RB6rL1xn9tbf25pMZRYmlHbM JP6iD1CSO50Gw/d8bMy8Ho2n8IOPZe6yEFDCo5U3MToC3wkya0YgO8VyVUdz512MUcRPrl 3z8CtRa4vN94U76iTfoc1MVrg3/6tNbs/L5QZG2wM7fdHk+vNFsdcy09Qsexf7TjyS8mEC Y2SOaYulldTm5JT49xTXwToSitYez1sBZdj5ApK7sepUn8DPYxw2oN7drNHzZC7y8aBoNR xTEZ3lOLVSaMGgNMxEM/rlsvkciLpGFkZZ8Qa5w5qk1mNtSJOXLrBCIPqbV/SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1698159469; 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=i4WztcesfGLmFW/6OXjj6hdE7qwOuuPrgA/1GMkGCFg=; b=9TWEP39cbiuM8cr/WW7Gb6EedVSN9U1W8zY58zVC75gAbWvMRU2EDnCuzNoWtk88fJoybQ 4vUUsQ+3RMIyQNz41GhzcjU+PfHhidd9/E2g6u1kpkZGgyTZWgGE4zN33wuGurPqQXCDum OpuM9RWT7Co2amBcghLFoOF1me6mBfTsQB0ACzk32hUZvoqEbMnf45NW/E6c39W8F0CP/l r4udibGivSr8kChdgFDDVEZ/tN6d/G+nFjmpT7ZgjyUjSlKgQJh+wsRVM4m2ijvLJ1022l HwrbnTi04xw2GXX2WDaY7bUaRF856U1YvvJWYight6St7QBSZwSCtjo2RKKYJA== ARC-Authentication-Results: i=1; rspamd-846f4b758b-fphl8; 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-Celery-Ski: 25d8fded53247c87_1698159469336_3629873639 X-MC-Loop-Signature: 1698159469336:2973588029 X-MC-Ingress-Time: 1698159469336 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.101.178.134 (trex/6.9.2); Tue, 24 Oct 2023 14:57:49 +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 4SFFXr2JY4zDf; Tue, 24 Oct 2023 07:57:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eagercon.com; s=dreamhost; t=1698159468; bh=i4WztcesfGLmFW/6OXjj6hdE7qwOuuPrgA/1GMkGCFg=; h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding; b=M2fmUHt1svRiJsv0HCHy+D+KXyyMZpsdLhv9rNpZp5M+dMfPWhiGoEDURV4CWdkOV EZuW59QsfptG4/3mrBFu7Ru8sHXqAvnDmeX1tJgZsoxzfhHP7iRD0GxRJvP9GkdHFy Z7A5ZmJSAdhmjhjq0R2rtbN2x3FAjKeYR15bV1ZKGuMxrShogUPy+C4U0KGWhdrpZG QUo3OmbShNmy/BW//edQhTu97+CHjKeWe5kRzJ/Ok9xnW1g8VImswznA3T7Mk2AUVa AoO8eu3r8PxBeTNookSBZbz2tvzqFbIQu/ZEgkuE5i3cwVFJ/psZX1fjBhcDMzMqwK 4d6DTlHWRfJ3w== Message-ID: Date: Tue, 24 Oct 2023 07:57:48 -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: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.4 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_H3,RCVD_IN_MSPIKE_WL,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/24/23 00:01, Frager, Neal 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. > > Hi Michael, > > Thanks to Mark Hatle's feedback, we have a much simpler solution to the problem. > > The following change is actually all that is necessary. Since we are just moving from > strcasecmp to strverscmp, does v2 of the patch need to have a test case to go with it? > > -#define MICROBLAZE_VERSION_COMPARE(VA,VB) strcasecmp (VA, VB) > +#define MICROBLAZE_VERSION_COMPARE(VA,VB) strverscmp (VA, VB) > > I assume there are already test cases that verify that strverscmp works correctly? Still need a test case to verify this fix. -- Michael Eager