This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/11] Add ARM_MAX_REGISTER_SIZE
- From: Alan Hayward <Alan dot Hayward at arm dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, nd <nd at arm dot com>
- Date: Tue, 11 Apr 2017 12:53:45 +0000
- Subject: Re: [PATCH 1/11] Add ARM_MAX_REGISTER_SIZE
- Authentication-results: sourceware.org; auth=none
- Authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
- Nodisclaimer: True
- References: <D7BDA6FD-6E9B-446A-A000-13546214C5DB@arm.com> <CAH=s-POSH2t=9v1WG3mhPo__inBkaHO6=p33DMxwS_iwyCkghg@mail.gmail.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
> On 5 Apr 2017, at 10:30, Yao Qi <qiyaoltc@gmail.com> wrote:
>
> On Tue, Apr 4, 2017 at 11:11 AM, Alan Hayward <Alan.Hayward@arm.com> wrote:
>> Max size set to 96bits, which is taken from FP_REGISTER_SIZE
>>
>
>> @@ -8153,7 +8153,7 @@ arm_store_return_value (struct type *type, struct regcache *regs,
>>
>> if (TYPE_CODE (type) == TYPE_CODE_FLT)
>> {
>> - gdb_byte buf[MAX_REGISTER_SIZE];
>> + gdb_byte buf[ARM_MAX_REGISTER_SIZE];
>>
>> switch (gdbarch_tdep (gdbarch)->fp_model)
>> {
>>
>
> "buf" is only used for PFA register, and its size is FP_REGISTER_SIZE
> so why don't we do "buf[FP_REGISTER_SIZE]?
>
> @@ -8160,11 +8177,10 @@ arm_store_return_value (struct type *type,
> struct regcache *regs, like this,
>
> if (TYPE_CODE (type) == TYPE_CODE_FLT)
> {
> - gdb_byte buf[MAX_REGISTER_SIZE];
> -
> switch (gdbarch_tdep (gdbarch)->fp_model)
> {
> case ARM_FLOAT_FPA:
> + gdb_byte buf[FP_REGISTER_SIZE];
>
> convert_to_extended (floatformat_from_type (type), buf, valbuf,
> gdbarch_byte_order (gdbarch));
> --
> Yao (齐尧)
Pushed with change as requested.
2017-04-11 Alan Hayward <alan.hayward@arm.com>
* arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
Alan.
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 9be79437941af89b877fff04dd4fa9f98f480693..5cc3f402e7eb3f1a3559a1b11d52a4d825f4cf05 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -8160,7 +8160,7 @@ arm_store_return_value (struct type *type, struct regcache *regs,
if (TYPE_CODE (type) == TYPE_CODE_FLT)
{
- gdb_byte buf[MAX_REGISTER_SIZE];
+ gdb_byte buf[FP_REGISTER_SIZE];
switch (gdbarch_tdep (gdbarch)->fp_model)
{