From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 93066 invoked by alias); 11 Feb 2016 11:17:59 -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 93056 invoked by uid 89); 11 Feb 2016 11:17:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=shortcuts, Hx-languages-length:1043, writers, displaced X-HELO: mail-pf0-f195.google.com Received: from mail-pf0-f195.google.com (HELO mail-pf0-f195.google.com) (209.85.192.195) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 11 Feb 2016 11:17:56 +0000 Received: by mail-pf0-f195.google.com with SMTP id e127so2409109pfe.3 for ; Thu, 11 Feb 2016 03:17:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type :content-transfer-encoding; bh=dLoGmk66dSsFthWaFt9S/4FNMYsjdtqGKo+3wKuFmS0=; b=hnGlINpDxmL60qKhSxTn7S10OD64r0rlT5A/gjRJDgdtzMNPwRvr8VXXlndGlClIDA Db09Ng6G/O67Hv1haNGa86X77hPjyn1IC88eXweKo0yt+LFs+epHA4a2sEn4+l9L1Y3G UPEdPJbdKhvoPZCxjMLTxyznd/2l2KLLj+Wnu+OxRxjPM520X7QWnpsgjliYvb/W6+/F LxDBtqwsh+XJSgEcjImpZra2EoOdl6BkdtK8RqmR5duLxPmGfQJxhZcuE8yHVRDoY5+K Ms1Uk8juQvCYV5N1C21Oz4rBu3fyOUPaA3uoKIZzhgGqpqPlcyl/V6LgEh5jdM9nFqGX s2Dg== X-Gm-Message-State: AG10YOSqUas/DrQdZcBKtadoahnlOvKegmrZSYjYvYyKOiZPPzd+CBuSF+857iV0H/JemQ== X-Received: by 10.98.43.149 with SMTP id r143mr40777247pfr.7.1455189474824; Thu, 11 Feb 2016 03:17:54 -0800 (PST) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id 69sm11636629pfj.20.2016.02.11.03.17.53 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 11 Feb 2016 03:17:54 -0800 (PST) From: Yao Qi To: Simon Marchi Cc: Subject: Re: [PATCH 0/3] Minor refactorings in arm-tdep.c instruction decoding References: <1455121027-27061-1-git-send-email-simon.marchi@ericsson.com> Date: Thu, 11 Feb 2016 11:17:00 -0000 In-Reply-To: <1455121027-27061-1-git-send-email-simon.marchi@ericsson.com> (Simon Marchi's message of "Wed, 10 Feb 2016 11:17:04 -0500") Message-ID: <86si0zpkbl.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: 2016-02/txt/msg00339.txt.bz2 Simon Marchi writes: > I am currently working on extracting the instruction decoding from the > displaced stepping support in arm-tdep.c, in order to share the functiona= lity > with the upcoming fast tracepoint support. I did a few refactors that he= lped > me correlate the code with the ARM Architecture Reference Manual. I thin= k the > change helps readability in general, and especially when you have the man= ual > open on the side. > > The idea is to follow the the order of the manual, use the same names and= do > the same "checks" (avoid using unnecessary shortcuts that make the code m= ore > cryptic). It is good to match the code to the manual. The instruction encoding can't change, but the order or the category of instruction _may_ change in the manual in the future. I am not the manual writer, but writers may want to refactor the doc in the future too :) Although your change is code refactor, better to run tests. --=20 Yao (=E9=BD=90=E5=B0=A7)