Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Alan Hayward via Gdb-patches <gdb-patches@sourceware.org>
To: Luis Machado <luis.machado@linaro.org>
Cc: Peter Maydell <peter.maydell@linaro.org>, nd <nd@arm.com>,
	"gdb-patches\\@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH 1/4] [ARM] Refactor some constants
Date: Fri, 8 Oct 2021 16:03:50 +0000	[thread overview]
Message-ID: <00021FB3-0B40-40C0-85F5-96383FD81DF9@arm.com> (raw)
In-Reply-To: <20211005144521.1965198-2-luis.machado@linaro.org>

Lgtm. Helpful regardless of MVE.


Alan.


> On 5 Oct 2021, at 15:45, Luis Machado <luis.machado@linaro.org> wrote:
> 
> In preparation for the MVE extension patch, this one refactors some of
> the register-related constants we have for ARM.
> 
> Basically I'm separating counting constants from numbering constants.
> 
> For example, ARM_A1_REGNUM is a numbering constant, whereas ARM_NUM_ARG_REGS
> is a counting constant.
> ---
> gdb/arch/arm.h | 14 ++++++++++----
> 1 file changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/gdb/arch/arm.h b/gdb/arch/arm.h
> index fa589fd0582..f6a155d6376 100644
> --- a/gdb/arch/arm.h
> +++ b/gdb/arch/arm.h
> @@ -50,17 +50,23 @@ enum gdb_regnum {
>   ARM_D31_REGNUM = ARM_D0_REGNUM + 31,
>   ARM_FPSCR_REGNUM,
> 
> -  ARM_NUM_REGS,
> -
>   /* Other useful registers.  */
>   ARM_FP_REGNUM = 11,		/* Frame register in ARM code, if used.  */
>   THUMB_FP_REGNUM = 7,		/* Frame register in Thumb code, if used.  */
> -  ARM_NUM_ARG_REGS = 4, 
>   ARM_LAST_ARG_REGNUM = ARM_A4_REGNUM,
> -  ARM_NUM_FP_ARG_REGS = 4,
>   ARM_LAST_FP_ARG_REGNUM = ARM_F3_REGNUM
> };
> 
> +/* Register count constants.  */
> +enum arm_register_counts {
> +  /* Number of argument registers.  */
> +  ARM_NUM_ARG_REGS = 4,
> +  /* Number of floating point argument registers.  */
> +  ARM_NUM_FP_ARG_REGS = 4,
> +  /* Number of registers (old, defined as ARM_FPSCR_REGNUM + 1.  */
> +  ARM_NUM_REGS = ARM_FPSCR_REGNUM + 1
> +};
> +
> /* Enum describing the different kinds of breakpoints.  */
> enum arm_breakpoint_kinds
> {
> -- 
> 2.25.1
> 


  reply	other threads:[~2021-10-08 16:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-05 14:45 [PATCH 0/4] [ARM] M-profile MVE extension support Luis Machado via Gdb-patches
2021-10-05 14:45 ` [PATCH 1/4] [ARM] Refactor some constants Luis Machado via Gdb-patches
2021-10-08 16:03   ` Alan Hayward via Gdb-patches [this message]
2021-10-05 14:45 ` [PATCH 2/4] [ARM] Small refactoring of arm gdbarch initialization Luis Machado via Gdb-patches
2021-10-08 16:03   ` Alan Hayward via Gdb-patches
2021-10-05 14:45 ` [PATCH 3/4] [ARM] Refactor pseudo register numbering Luis Machado via Gdb-patches
2021-10-08 16:04   ` Alan Hayward via Gdb-patches
2021-10-11 13:06     ` Luis Machado via Gdb-patches
2021-10-05 14:45 ` [PATCH 4/4] [ARM] Add support for M-profile MVE extension Luis Machado via Gdb-patches
2021-10-05 15:55   ` Eli Zaretskii via Gdb-patches
2021-10-08 16:34   ` Alan Hayward via Gdb-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=00021FB3-0B40-40C0-85F5-96383FD81DF9@arm.com \
    --to=gdb-patches@sourceware.org \
    --cc=Alan.Hayward@arm.com \
    --cc=luis.machado@linaro.org \
    --cc=nd@arm.com \
    --cc=peter.maydell@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox