From: Stafford Horne <shorne@gmail.com>
To: openrisc@lists.librecores.org
Subject: [OpenRISC] [PATCH 06/18] gdb: or1k: set gdbarch num regs to gpr + spr regs
Date: Thu, 24 Nov 2016 07:10:32 +0900 [thread overview]
Message-ID: <1479939044-1341-7-git-send-email-shorne@gmail.com> (raw)
In-Reply-To: <1479939044-1341-1-git-send-email-shorne@gmail.com>
From: Franck Jullien <franck.jullien@gmail.com>
Add a definition for SPR maximum number (OR1K_MAX_SPR_REGS).
This value is set to 64K (32 groups of 2048 registers).
gdb/ChangeLog:
* or1k-tdep.c: use OR1K_MAX_SPR_REGS
* or1k-tdep.h: add OR1K_MAX_SPR_REGS
---
gdb/or1k-tdep.c | 6 +++---
gdb/or1k-tdep.h | 14 ++++++++------
2 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/gdb/or1k-tdep.c b/gdb/or1k-tdep.c
index d660a39..1a3c16b 100644
--- a/gdb/or1k-tdep.c
+++ b/gdb/or1k-tdep.c
@@ -684,7 +684,7 @@ static const char *
or1k_register_name (struct gdbarch *gdbarch,
int regnum)
{
- static char *or1k_gdb_reg_names[OR1K_TOTAL_NUM_REGS] =
+ static char *or1k_gdb_reg_names[OR1K_NUM_REGS_CACHED] =
{
/* general purpose registers */
"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
@@ -784,7 +784,7 @@ or1k_registers_info (struct gdbarch *gdbarch,
if (-1 == regnum)
{
/* Do all (valid) registers */
- unsigned int lim = all ? OR1K_NUM_REGS : OR1K_MAX_GPR_REGS;
+ unsigned int lim = all ? OR1K_NUM_REGS_CACHED : OR1K_MAX_GPR_REGS;
for (regnum = 0; regnum < lim; regnum++) {
if ('\0' != *(or1k_register_name (gdbarch, regnum)))
@@ -837,7 +837,7 @@ or1k_register_reggroup_p (struct gdbarch *gdbarch,
if (group == all_reggroup)
{
return ((regnum >= 0) &&
- (regnum < OR1K_TOTAL_NUM_REGS) &&
+ (regnum < OR1K_NUM_REGS_CACHED) &&
(or1k_register_name (gdbarch, regnum)[0] != '\0'));
}
diff --git a/gdb/or1k-tdep.h b/gdb/or1k-tdep.h
index 3179537..f0afc8f 100644
--- a/gdb/or1k-tdep.h
+++ b/gdb/or1k-tdep.h
@@ -317,19 +317,21 @@
#define OR1K_SPR_DCFGR_WPCI 0x00000008 /* Watchpoint ctrs implemented */
/* Properties of the architecture. GDB mapping of registers is all the GPRs
- followed by the PPC, NPC and SR at the end. Red zone is the area past the
- end of the stack reserved for exception handlers etc. */
-#define OR1K_MAX_GPR_REGS 32
+ and SPRs followed by the PPC, NPC and SR@the end. Red zone is the area
+ past the end of the stack reserved for exception handlers etc. */
+#define OR1K_MAX_GPR_REGS 32
+#define OR1K_MAX_SPR_REGS (32 * 2048)
#define OR1K_NUM_PSEUDO_REGS 0
-#define OR1K_NUM_REGS (OR1K_MAX_GPR_REGS + 3)
+#define OR1K_NUM_REGS_CACHED (OR1K_MAX_GPR_REGS + 3)
+#define OR1K_NUM_REGS (OR1K_NUM_REGS_CACHED + OR1K_MAX_SPR_REGS)
#define OR1K_TOTAL_NUM_REGS (OR1K_NUM_REGS + OR1K_NUM_PSEUDO_REGS)
#define OR1K_MAX_MATCHPOINTS 8
#define OR1K_MAX_HW_WATCHES OR1K_MAX_MATCHPOINTS
#define OR1K_STACK_ALIGN 4
#define OR1K_INSTLEN 4
-#define OR1K_INSTBITLEN (OR1K_INSTLEN * 8)
+#define OR1K_INSTBITLEN (OR1K_INSTLEN * 8)
#define OR1K_NUM_TAP_RECORDS 8
-#define OR1K_FRAME_RED_ZONE_SIZE 2536
+#define OR1K_FRAME_RED_ZONE_SIZE 2536
/* OR1K exception vectors */
--
2.7.4
next prev parent reply other threads:[~2016-11-23 22:10 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-23 22:10 [OpenRISC] [PATCH 00/18] gdb: Port for OpenRISC Stafford Horne
2016-11-23 22:10 ` [OpenRISC] [PATCH 01/18] gdb: add or1k and or1knd target support Stafford Horne
2016-11-23 22:10 ` [OpenRISC] [PATCH 02/18] gdb: or1k: Add a check for NULL ptr in or1k_skip_prologue Stafford Horne
2016-11-23 22:10 ` [OpenRISC] [PATCH 03/18] gdb: or1k: Add or1k_push_dummy_code and use it Stafford Horne
2016-11-23 22:10 ` [OpenRISC] [PATCH 04/18] gdb: add tdesc_find_register functions Stafford Horne
2016-11-23 22:10 ` [OpenRISC] [PATCH 05/18] gdb: handle arbitrary strings in tdesc_register_in_reggroup_p Stafford Horne
2016-11-23 22:10 ` Stafford Horne [this message]
2016-11-23 22:10 ` [OpenRISC] [PATCH 07/18] gdb: or1k: add target descriptor support Stafford Horne
2016-11-23 22:10 ` [OpenRISC] [PATCH 08/18] gdb: or1k: change or1k_push_dummy_code stack alignment Stafford Horne
2016-11-23 22:10 ` [OpenRISC] [PATCH 09/18] gdb: or1k: Silence gcc warning Stafford Horne
2016-11-23 22:10 ` [OpenRISC] [PATCH 10/18] gdb: or1k: Fixes for things that broke after upstream merge Stafford Horne
2016-11-23 22:10 ` [OpenRISC] [PATCH 11/18] Add gdb for or1k build Stafford Horne
2016-11-23 22:10 ` [OpenRISC] [PATCH 12/18] gdb: or1k: Apply changes of the last two years Stafford Horne
2016-11-23 22:10 ` [OpenRISC] [PATCH 13/18] gdb: Add OpenRISC to texinfo menu Stafford Horne
2016-11-23 22:10 ` [OpenRISC] [PATCH 14/18] gdb: testsuite: Add or1k l.nop inscruction Stafford Horne
2016-11-23 22:10 ` [OpenRISC] [PATCH 15/18] gdb: or1k: Update calling conventions to help pass tests Stafford Horne
2016-11-23 22:10 ` [OpenRISC] [PATCH 16/18] gdb: Remove corelow object from or1k linux build Stafford Horne
2016-11-23 22:10 ` [OpenRISC] [PATCH 17/18] gdb: or1k: Updates for compiler type checking Stafford Horne
2016-11-23 22:10 ` [OpenRISC] [PATCH 18/18] gdb: or1k: Refactor to new bp_kind_from_pc and pb_from_kind Stafford Horne
2016-11-24 20:36 ` [OpenRISC] [PATCH 00/18] gdb: Port for OpenRISC Yao Qi
2016-11-25 22:50 ` Stafford Horne
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=1479939044-1341-7-git-send-email-shorne@gmail.com \
--to=shorne@gmail.com \
--cc=openrisc@lists.librecores.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.