From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.smtpout.orange.fr (smtp-14.smtpout.orange.fr [80.12.242.14]) by sourceware.org (Postfix) with ESMTPS id 42C9D3858C62 for ; Thu, 8 Jun 2023 16:49:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 42C9D3858C62 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=orange.fr Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=orange.fr Received: from [192.168.1.16] ([86.215.161.51]) by smtp.orange.fr with ESMTPA id 7IooqF0A2onlZ7IopqtA9S; Thu, 08 Jun 2023 18:49:04 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=orange.fr; s=t20230301; t=1686242944; bh=24k7ZVysSrWJCr0SIi1kRuElhzqWgDajve5UK4yj/6w=; h=Date:Subject:To:References:From:In-Reply-To; b=TWZLsi+SVmIfQp2KAXODJHsE4TyAGAQu45NOydr94b/83V3gNwdogY4YI3YoKBCAs J8zsK8ZdbumwrpBcBtYw5H2kI1pnLSuTiy65AT2x/G/JCUICZRndB5+SqYN/guc+z0 BHlxWHMdAX/vEy9r6Qn/uN2Sojy063kV+Amw77Yre/n8fdD4Ckv8g3IQsACT+NeQPS BjX8IN5H1Fyd3LEBTEO1d2RknqX2aEzwsl/zVUwVpkvSdyjdTF+zf7uZXtpfVbe9w7 lhlB3G7N1Sim69NQw46b78NFqnILmwIJBQallAUEfd6GXMQVBah9zNpQZwLk2QOWuh hUqqci+bMYh7g== X-ME-Helo: [192.168.1.16] X-ME-Auth: bW9yaW4tbWlrYWVsQG9yYW5nZS5mcg== X-ME-Date: Thu, 08 Jun 2023 18:49:04 +0200 X-ME-IP: 86.215.161.51 Message-ID: <30f06911-e19a-a39b-9b56-803cc9ef0ec1@orange.fr> Date: Thu, 8 Jun 2023 18:49:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v2] machine descriptor: New compact syntax for insn and insn_split in Machine Descriptions. Content-Language: fr To: Tamar Christina , Richard Earnshaw , "gcc-patches@gcc.gnu.org" , nd , Richard Sandiford References: From: Mikael Morin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,JMQ_SPF_NEUTRAL,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Le 08/06/2023 à 11:58, Tamar Christina via Gcc-patches a écrit : > Hi, > > New version of the patch, I've omitted the explanation again 😊 > > Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. > > Any feedback? > Hello, this is not my area of expertise, but I saw the following: > + /* [ns..ns + len) should be a string with the id of the rtx to match > + i.e. if rtx is the relevant match_operand or match_scratch then > + [ns..ns + len) should equal itoa (XINT (rtx, 0)), and if set_attr then > + [ns..ns + len) should equal XSTR (rtx, 0). */ > + conlist (const char *ns, unsigned int len, bool numeric) > + { > + /* Trim leading whitespaces. */ > + while (ISSPACE (*ns)) > + { > + ns++; > + len--; > + } > + > + /* Trim trailing whitespace. */ > + for (int i = len - 1; i >= 0; i++, len--) > + if (!ISSPACE (*ns)) > + break; > + This for loop makes little sense to me. Shouldn't the iteration step be i-- rather than i++ and the pointer dereference *(ns + i) rather than *ns?