From: Luis Machado via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Cc: peter.maydell@linaro.org
Subject: [PATCH 1/4] [ARM] Refactor some constants
Date: Tue, 5 Oct 2021 11:45:18 -0300 [thread overview]
Message-ID: <20211005144521.1965198-2-luis.machado@linaro.org> (raw)
In-Reply-To: <20211005144521.1965198-1-luis.machado@linaro.org>
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
next prev parent reply other threads:[~2021-10-05 14:46 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 ` Luis Machado via Gdb-patches [this message]
2021-10-08 16:03 ` [PATCH 1/4] [ARM] Refactor some constants Alan Hayward via Gdb-patches
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=20211005144521.1965198-2-luis.machado@linaro.org \
--to=gdb-patches@sourceware.org \
--cc=luis.machado@linaro.org \
--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