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: [RFA] Change AUXV bit checked to decide the size of the FPSCR


(Thiago - I like the quality of the work you produce, very nice!)

> For this reason, I'm changing GDB to check for DFP to decide what is the
> size of the FPSCR (it changed from 32 bits to 64 bits with ISA 2.05 and
> newer). Since for now the only higher bits used are for Decimal Floating
> Point, I am changing the code to check the DFP bit in AUXV.

This sounds more like a work-around than a real fix. I don't mind
your approach, but I think it deserves a clear comment in the code
where you use that flag to determine the size of your registers.

For the record, another solution that you probably considered was to
check for PPC_FEATURE_ARCH_2_05 *or* PPC_FEATURE_ARCH_2_06, but I can
see how this might become cumbersome as future revisions get added.

> gdb/
> 	* ppc-linux-nat.c (PPC_FEATURE_ARCH_2_05): Remove #define.
> 	(PPC_FEATURE_HAS_DFP): New #define.
> 	(ppc_linux_read_description): Check for DFP feature instead of
> 	ISA 2.05 to decide on size of the FPSCR.
> 
> gdbserver/
> 	* linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
> 	(PPC_FEATURE_HAS_DFP): New #define.
> 	(ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
> 	size of the FPSCR.

Both OK with the requested comments added.

-- 
Joel


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