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] Removal of uses of MAX_REGISTER_SIZE


On 02/03/2017 10:28 AM, Yao Qi wrote:

> I don't think we have to replace all MAX_REGISTER_SIZE with std::vector.
> MAX_REGISTER_SIZE is mostly used in arch-dependent code (*-tdep.c
> and *-nat.c), where the register size or max register size is known.  For
> example, MAX_REGISTER_SIZE is used only once in arm-tdep.c, and
> it can be replaced with FP_REGISTER_SIZE, because 'buf' is to get the
> contents for FPA register.  Similarly, MAX_REGISTER_SIZE is used three
> times in aarch64-tdep.c, all of them can be repalced by V_REGISTER_SIZE.
> Also, MAX_REGISTER_SIZE can be replaced by
> I386_MAX_REGISTER_SIZE in i386-tdep.c.  I would like to examine the
> usages of MAX_REGISTER_SIZE in each target-dependent code, and
> replace MAX_REGISTER_SIZE with known constants as much as we can.
> I don't think anyone has objections on replacing one constant
> MAX_REGISTER_SIZE with other smaller constants :)
> 
> Then, let us discuss how to remove MAX_REGISTER_SIZE from
> arch-independent code after all above is done.
> 

+1.

Thanks,
Pedro Alves


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