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]

PATCH: Add builtin floating point types


On Thu, Feb 4, 2010 at 2:24 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> x86 has i387_ext. I added
>
> ? case TDESC_TYPE_I387_EXT:
> ? ? ?return arch_float_type (gdbarch, -1, "builtin_type_i387_ext",
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?floatformats_i387_ext);
>
> to tdesc_gdb_type. I would up 8 i387_ext types at different addresses
> with the same bits. x86 does
>
> if (i386_fp_regnum_p (gdbarch, regnum))
> ? ?{
> ? ? ?/* Floating point registers must be converted unless we are
> ? ? ? ? accessing them in their hardware type. ?*/
> ? ? ?if (type == i387_ext_type (gdbarch))
> ? ? ? ?return 0;
> ? ? ?else
> ? ? ? ?return 1;
> ? ?}
>
> It expects 2 ?i387_ext types should have the same address. Ha
> can I cache the i387_ext type for single gdbarch?
>

Here is a patch to add builtin floating point types.  OK to install?

Thanks.


-- 
H.J.
---
2010-02-04  H.J. Lu  <hongjiu.lu@intel.com>

	* amd64-tdep.c (amd64_register_type): Replace i387_ext_type
	with builtin_i387_ext.
	* i387-tdep.c (print_i387_value): Likewise.
	(i387_convert_register_p): Likewise.
	(i387_register_to_value): Likewise.
	(i387_value_to_register): Likewise.

	* gdbtypes.c (gdbtypes_post_init): Initialize
	builtin_ieee_single, builtin_ieee_double and builtin_i387_ext.

	* gdbtypes.h (builtin_type): Add builtin_ieee_single,
	builtin_ieee_double and builtin_i387_ext.

	* i386-tdep.c (i386_extract_return_value): Replace
	i387_ext_type with builtin_i387_ext.
	(i386_register_type): Likewise.
	(i387_ext_type): Removed.

	* i386-tdep.h (gdbarch_tdep): Remove i387_ext_type.
	(i387_ext_type): Removed.

	* target-descriptions.c (tdesc_gdb_type): Use
	builtin_ieee_single and builtin_ieee_double.

Attachment: gdb-fp-1.patch
Description: Text document


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