From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21599 invoked by alias); 3 Feb 2017 11:00:30 -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 21309 invoked by uid 89); 3 Feb 2017 11:00:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=FPA, fpa, sk:i386_ma, sk:I386_MA X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 03 Feb 2017 11:00:03 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 81D3019CBD8; Fri, 3 Feb 2017 11:00:01 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.phx2.redhat.com [10.5.9.4]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v13Axs98029168; Fri, 3 Feb 2017 05:59:59 -0500 Subject: Re: [PATCH] Removal of uses of MAX_REGISTER_SIZE To: Yao Qi , Alan Hayward References: <7CF07197-4FED-4970-BB4B-2FE828E29A63@arm.com> <45e3a5e1-a9aa-1bc0-5d08-526b89fc458e@redhat.com> <20170201124123.GA27498@E107787-LIN> <20170202094012.dge4r6rsl2skdrii@adacore.com> <20170203102819.GA11916@E107787-LIN> Cc: Joel Brobecker , "gdb-patches@sourceware.org" From: Pedro Alves Message-ID: <25716edf-096e-20c5-4170-fb8ca04d897b@redhat.com> Date: Fri, 03 Feb 2017 11:00:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20170203102819.GA11916@E107787-LIN> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-02/txt/msg00095.txt.bz2 On 02/03/2017 10:28 AM, Yao Qi wrote: > I don't think we have to replace all MAX_REGISTER_SIZE with std::vector. > MAX_REGISTER_SIZE is mostly used in arch-dependent code (*-tdep.c > and *-nat.c), where the register size or max register size is known. For > example, MAX_REGISTER_SIZE is used only once in arm-tdep.c, and > it can be replaced with FP_REGISTER_SIZE, because 'buf' is to get the > contents for FPA register. Similarly, MAX_REGISTER_SIZE is used three > times in aarch64-tdep.c, all of them can be repalced by V_REGISTER_SIZE. > Also, MAX_REGISTER_SIZE can be replaced by > I386_MAX_REGISTER_SIZE in i386-tdep.c. I would like to examine the > usages of MAX_REGISTER_SIZE in each target-dependent code, and > replace MAX_REGISTER_SIZE with known constants as much as we can. > I don't think anyone has objections on replacing one constant > MAX_REGISTER_SIZE with other smaller constants :) > > Then, let us discuss how to remove MAX_REGISTER_SIZE from > arch-independent code after all above is done. > +1. Thanks, Pedro Alves