+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.
#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)
{
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). */
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;