diff mbox

Remove MAX_REGISTER_SIZE from aarch64-tdep.c

Message ID 60390C6C-732F-428F-BCD0-57914872401E@arm.com
State New
Headers show

Commit Message

Alan Hayward June 7, 2017, 8:37 a.m. UTC
Simply uses V_REGISTER_SIZE within the pseudo read/write functions.

Tested on aarch64.
Tested on a --enable-targets=all and asan build using
make check with board files unix, native-gdbserver and unittest.

Ok to commit?

Alan


2017-06-07  Alan Hayward  <alan.hayward@arm.com>

	* aarch64-tdep.c (aarch64_store_return_value): Use
	V_REGISTER_SIZE.
	(aarch64_pseudo_read_value): Likewise.
	(aarch64_pseudo_write): Likewise.

Comments

Yao Qi June 7, 2017, 8:46 a.m. UTC | #1
Alan Hayward <Alan.Hayward@arm.com> writes:

> Ok to commit?
>
> 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
>
> 	* aarch64-tdep.c (aarch64_store_return_value): Use
> 	V_REGISTER_SIZE.
> 	(aarch64_pseudo_read_value): Likewise.
> 	(aarch64_pseudo_write): Likewise.

OK.
diff mbox

Patch

diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c
index 000540a4f52b4a856e9b88afef8395b52d7612c9..a5db6ed29d90e3166f885cd1367214fab669818f 100644
--- a/gdb/aarch64-tdep.c
+++ b/gdb/aarch64-tdep.c
@@ -1987,7 +1987,7 @@  aarch64_store_return_value (struct type *type, struct regcache *regs,
       for (i = 0; i < elements; i++)
 	{
 	  int regno = AARCH64_V0_REGNUM + i;
-	  bfd_byte tmpbuf[MAX_REGISTER_SIZE];
+	  bfd_byte tmpbuf[V_REGISTER_SIZE];

 	  if (aarch64_debug)
 	    {
@@ -2241,7 +2241,7 @@  aarch64_pseudo_read_value (struct gdbarch *gdbarch,
 			   struct regcache *regcache,
 			   int regnum)
 {
-  gdb_byte reg_buf[MAX_REGISTER_SIZE];
+  gdb_byte reg_buf[V_REGISTER_SIZE];
   struct value *result_value;
   gdb_byte *buf;

@@ -2336,7 +2336,7 @@  static void
 aarch64_pseudo_write (struct gdbarch *gdbarch, struct regcache *regcache,
 		      int regnum, const gdb_byte *buf)
 {
-  gdb_byte reg_buf[MAX_REGISTER_SIZE];
+  gdb_byte reg_buf[V_REGISTER_SIZE];

   /* Ensure the register buffer is zero, we want gdb writes of the
      various 'scalar' pseudo registers to behavior like architectural