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: PATCH: Add builtin floating point types


On Sun, Feb 7, 2010 at 1:52 PM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
>> Date: Thu, 4 Feb 2010 17:14:47 -0800
>> From: "H.J. Lu" <hongjiu.lu@intel.com>
>>
>> I am resending this patch. The motivation is I am working on x86 xml
>> target descriptions. ?x86 has i387_ext type. 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 8 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. ?This
>> patch caches ieee_single, ieee_double and i387_ext. OK to install?
>
> Sorry, but I don't like this diff. ?At the very least, keep the
> i387_ext_type() function around. ?It makes the diff far less invasive.

Is there a way to call i387_ext_type from  target-descriptions.c?
Otherwise,  XML target description will create multiple i386_ext
types and won't work for x86 since x86 requires single i386_ext
type per arch.

Thanks.


-- 
H.J.


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