From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 68292 invoked by alias); 22 Jun 2017 14:49:11 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 68277 invoked by uid 89); 22 Jun 2017 14:49:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=SYSTEM, DOCTYPE, doctype, !DOCTYPE X-HELO: mail-io0-f177.google.com Received: from mail-io0-f177.google.com (HELO mail-io0-f177.google.com) (209.85.223.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 22 Jun 2017 14:49:08 +0000 Received: by mail-io0-f177.google.com with SMTP id c201so24379499ioe.1 for ; Thu, 22 Jun 2017 07:49:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=p1Ro1uFXL2cHR3+Ql3wAMNNbpy2hcMAnCcndjFRxe4I=; b=KcqCfmHHyM19xI7uuzeC22sYnRZyt7j9qHxUOpCHOQaXx3+6uwtvqPXEUZbvlcVA4c 6opOWtBnyuNMM9E14CTrqPaQZdZtUNobPOg+D8Z/M2jbglpm5J4LLN/MKwdkBXbT+T+b UTTCZRU4mpJqhqMF3nz/k/cuvOHxmLcC25beJNtQiEFBfKUqXFFRD3cts+YLWFXDCc0v tFfK4/DLv6ybWrS61ukYR5Px4VSvWDOCbOqpYM0OYXvRl6Q17hcLIMImFm+2MlFy/mQF 1aiRWWm8b87Q68oadx2uIFbTHGfs69w8Rg1/IGAvdnrAG3xYfvErV5vSbt7MYww5N90J LgUw== X-Gm-Message-State: AKS2vOz1bsUWEc2OAtE+N9JSCxla6dxhPbbsPmzcIzqkR6Svey8DC0q2 rIRjjMBl4rfKxUPD X-Received: by 10.107.191.71 with SMTP id p68mr2592756iof.100.1498142946874; Thu, 22 Jun 2017 07:49:06 -0700 (PDT) Received: from E107787-LIN (static.42.136.251.148.clients.your-server.de. [148.251.136.42]) by smtp.gmail.com with ESMTPSA id h67sm1103453itb.19.2017.06.22.07.49.05 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 22 Jun 2017 07:49:06 -0700 (PDT) From: Yao Qi To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 06/25] Generate c for feature instead of tdesc References: <1497256916-4958-1-git-send-email-yao.qi@linaro.org> <1497256916-4958-7-git-send-email-yao.qi@linaro.org> Date: Thu, 22 Jun 2017 14:49:00 -0000 In-Reply-To: (Pedro Alves's message of "Tue, 20 Jun 2017 11:59:46 +0100") Message-ID: <86mv90hyci.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg00649.txt.bz2 Pedro Alves writes: > On 06/12/2017 09:41 AM, Yao Qi wrote: >> +$(FEATURE_CFILES): %.c: %.xml.tmp >> + $(GDB) -nx -q -batch \ >> + -ex 'maint print c-tdesc $<' > $@.tmp >> + sh ../../move-if-change $@.tmp $@ >> + rm $< >> + >> +%.xml.tmp: %.xml >> + echo "" > $@ >> + echo "" >> $@ >> + echo "" >> $@ >> + echo " " >> $@ >> + if test $(findstring i386/32bit-,$@); then echo "i386" >> $@ ; fi; >> + echo " " >> $@ >> + echo " " >> $@ >> + echo "" >> $@ >> + > > Don't we need move-if-change here? > move-if-change from what to what? *.xml.tmp is removed after *.c is generated. > The findstring bits warrants a comment. > Yes, comment is needed. >> +/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: >> + Original: 32bit-avx512.xml.tmp */ > > I don't think we should be pointing "Original" at a=20 > temporary file that does not exist in the repo? Fixed locally. > > On 06/12/2017 09:41 AM, Yao Qi wrote: >> - print_c_tdesc v (filename_after_features); >> + if (strncmp (filename_after_features.c_str(), "i386/32bit-", 11) =3D= =3D 0) > > startswith > > But again, this looks like needs at least a comment. I'd > like to see an expanded rationale for this. It's not > immediately obvious why/what's this special casing for. OK. Note that the special case and the findstring in Makefile are needed during the target description transition. Once we move all targets to the flexible target description, we don't need them. --=20 Yao (=E9=BD=90=E5=B0=A7)