Add XTENSA_MAX_REGISTER_SIZE
authorAlan Hayward <alan.hayward@arm.com>
Fri, 23 Jun 2017 09:21:39 +0000 (10:21 +0100)
committerAlan Hayward <alan.hayward@arm.com>
Fri, 23 Jun 2017 09:21:39 +0000 (10:21 +0100)
gdb/
* xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
(xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
(xtensa_register_read_masked): Likewise.

gdb/ChangeLog
gdb/xtensa-tdep.c

index 95010fc6129189a01f08c709e5f96fa3aa696470..bbbd5fb19cb88ab3caf6e71920d32660a3bb6c12 100644 (file)
@@ -1,3 +1,9 @@
+2017-06-23  Alan Hayward  <alan.hayward@arm.com>
+
+       * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
+       (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
+       (xtensa_register_read_masked): Likewise.
+
 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
 
        * common/environ.c (gdb_environ::unset): Update comment.
index f9e858473a409ff082d30f9ff474d48da63903e3..f875f20d32b68abc37e3db37ab3e6053918536e5 100644 (file)
@@ -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;
This page took 0.029685 seconds and 4 git commands to generate.