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][PR gdb/7518] MIPS: Handle run-time reconfigurable FPR size


> 2012-06-06  Maciej W. Rozycki  <macro@codesourcery.com>
>             Nigel Stephens  <nigel@mips.com>
>             David Ung  <davidu@mips.com>
> 
> 	PR gdb/7518
> 
> 	gdb/
> 	* gdbarch.sh (regcache_changed): New function.
> 	* regcache.c (set_current_thread_ptid_arch): New function,
> 	factored out from...
> 	(get_thread_regcache): ... here.  Call gdbarch_regcache_changed
> 	as necessary.
> 	* mips-tdep.h (gdbarch_tdep): Add fp_register_size_fixed_p and
> 	fp_register_size members.
> 	(gdbarch_tdep_info): New structure.
> 	* mips-tdep.c (mips_register_type): Remove forward declaration.
> 	(mips_set_float_regsize, mips_float_regsize): New functions.
> 	(mips2_fp_compat): Remove function.
> 	(mips_register_type): Use mips_float_regsize to handle cooked
> 	floating-point registers.  Fold floating-point cases into common
> 	code.
> 	(mips_pseudo_register_type): Update comment on floating-point
> 	registers.
> 	(mips_read_fp_register_single): Rename raw_size local variable
> 	to fpsize.
> 	(mips_read_fp_register_double): Likewise.  Remove call to
> 	mips2_fp_compat.
> 	(mips_print_fp_register): Check the size of the register
> 	requested rather than $f0 and use fpsize local variable to hold
> 	it.  Remove call to mips2_fp_compat.
> 	(mips_print_float_info): Use mips_float_regsize.
> 	(mips_gdbarch_init): Use a proper tdep_info structure.  Match
> 	gdbarch against fp_register_size requested if any.  Initialize
> 	fp_register_size and fp_register_size_fixed_p in gdbarch target
> 	data.  Install mips_set_float_regsize as gdbarch regcache_changed
> 	routine.
> 	* mips-irix-tdep.c (mips_irix_init_abi): Set
> 	fp_register_size_fixed_p in gdbarch target data.
> 	* mips-linux-tdep.c (mips_linux_init_abi): Likewise.  Adjust for
> 	tdep_info update.
> 	* gdbarch.h: Regenerate.
> 	* gdbarch.c: Regenerate.

This change looks fine to me, but I am hesitant to approve it because
of the changes in regcache. I haven't made many changes to this module
in the past, so not a good candicate to review them.

Anyone else wants to take a shot at this patch?

Thanks,
-- 
Joel


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