From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from vimdzmsp-sfwd05.bluewin.ch (vimdzmsp-sfwd05.bluewin.ch [195.186.120.133]) by sourceware.org (Postfix) with ESMTPS id 7141A3858414 for ; Thu, 16 Dec 2021 20:59:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7141A3858414 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=bluewin.ch Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bluewin.ch Received: from [192.168.1.139] ([100.86.249.88]) by vimdzmsp-sfwd05.bluewin.ch Swisscom AG with ESMTPA id xxq7mIIdderRqxxq7miYW8; Thu, 16 Dec 2021 21:59:00 +0100 X-Bluewin-Spam-Analysis: v=2.4 cv=Wfpv12tX c=1 sm=1 tr=0 ts=61bba894 a=877VlHVuiA5dp/8tCas2JQ==:117 a=IkcTkHD0fZMA:10 a=gfNwyXxRNNwlpHmNCyUA:9 a=QEXdDO2ut3YA:10 X-Bluewin-Spam-Score: 0.00 X-FXIT-IP: IPv4[100.86.249.88] Epoch[1639688340] X-Bluewin-AuthAs: stefan.kneifel@bluewin.ch Message-ID: <7b55d00c-4ce0-3377-d0db-c9efcd32b843@bluewin.ch> Date: Thu, 16 Dec 2021 21:58:59 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: [PATCH] i386: simplify cpu_feature handling Content-Language: en-US To: =?UTF-8?Q?Martin_Li=c5=a1ka?= , Jakub Jelinek Cc: gcc-patches@gcc.gnu.org References: <20211214102828.GU2646553@tucnak> <80d628c2-ea0d-c542-b0bb-399d83b7292d@suse.cz> <20211214161219.GX2646553@tucnak> From: Stefan Kneifel In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfMTz5xhTfiOAHlTiogm+YZpfLzI0Ku76G4lzTvX6eHyY8hqY9c0uzshlaL6v8wHK1kNcI0liq5vjyypGwG1MHxLkdMzP4KPf6dWU6OkCcQ6+e/ztfE7a wdZI+Yr0MLQPQMZx1l6vMfc7yPSMUGJmWPI8lpF/ewnd6ftmr2NwpX+S+KOPhMV8nHmmtDnAAP+oKPtkLlLX+hBgPSScqbnxXC9uYPvzEHjyqCsyBz8eJgqQ k9fMPDtF9fIB4g8LQolHIw== X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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-List-Received-Date: Thu, 16 Dec 2021 20:59:05 -0000 Am 15.12.21 um 10:57 schrieb Martin Liška: > On 12/14/21 17:12, Jakub Jelinek wrote: >> I'd use INT_TYPE_SIZE - 1 instead of 31. Otherwise LGTM. > > Installed with that change, thanks. > > Moreover, I'm suggesting a simplification: > > The patch removes unneeded loops for cpu_features2 and CONVERT_EXPR > that can be simplified with NOP_EXPR. > > Survives i386.exp tests, may I install the patch after testing or > is it a stage1 material? > > Thanks, > Martin The loops indeed seem to be unnecessary. For safety reasons: what would you think about throwing an ICE if (index >= SIZE_OF_CPU_FEATURES) ? This should not happen - however, a lot of things shouldn't happen... and it might facilitiate locating a potential bug at a later time. Regards, Stefan