This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/11] Add ARM_MAX_REGISTER_SIZE


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 (齐尧)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]