summaryrefslogtreecommitdiff
path: root/gdb/xtensa-tdep.c
diff options
context:
space:
mode:
authorAlan Hayward <alan.hayward@arm.com>2017-06-23 10:21:39 +0100
committerAlan Hayward <alan.hayward@arm.com>2017-06-23 10:21:39 +0100
commit0dd5cbc56307afaf6a366a8e78ef25cf9cefe514 (patch)
tree42d1e8f45cb2d30034669f8bc7d41e7e49982056 /gdb/xtensa-tdep.c
parentb4cbbe8f7294070cc93a71ace78f134965ddad82 (diff)
downloadbinutils-gdb-0dd5cbc56307afaf6a366a8e78ef25cf9cefe514.tar.gz
Add XTENSA_MAX_REGISTER_SIZE
gdb/ * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add. (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE. (xtensa_register_read_masked): Likewise.
Diffstat (limited to 'gdb/xtensa-tdep.c')
-rw-r--r--gdb/xtensa-tdep.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c
index f9e858473a4..f875f20d32b 100644
--- a/gdb/xtensa-tdep.c
+++ b/gdb/xtensa-tdep.c
@@ -120,6 +120,9 @@ static unsigned int xtensa_debug_level = 0;
#define PS_WOE (1<<18)
#define PS_EXC (1<<4)
+/* Big enough to hold the size of the largest register in bytes. */
+#define XTENSA_MAX_REGISTER_SIZE 64
+
static int
windowing_enabled (struct gdbarch *gdbarch, unsigned int ps)
{
@@ -370,7 +373,7 @@ static void
xtensa_register_write_masked (struct regcache *regcache,
xtensa_register_t *reg, const gdb_byte *buffer)
{
- unsigned int value[(MAX_REGISTER_SIZE + 3) / 4];
+ unsigned int value[(XTENSA_MAX_REGISTER_SIZE + 3) / 4];
const xtensa_mask_t *mask = reg->mask;
int shift = 0; /* Shift for next mask (mod 32). */
@@ -454,7 +457,7 @@ static enum register_status
xtensa_register_read_masked (struct regcache *regcache,
xtensa_register_t *reg, gdb_byte *buffer)
{
- unsigned int value[(MAX_REGISTER_SIZE + 3) / 4];
+ unsigned int value[(XTENSA_MAX_REGISTER_SIZE + 3) / 4];
const xtensa_mask_t *mask = reg->mask;
int shift = 0;