This is the mail archive of the gdb-patches@sourceware.cygnus.com 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]

Re: RFA: USE_STRUCT_CONVENTION for NetBSD/i386


>>>>> "Andrew" == Andrew Cagney <ac131313@cygnus.com> writes:
>> ! int
>> ! i386nbsd_use_struct_convention (int gcc_p, struct type *type)
>> ! {
>> !   return !(TYPE_LENGTH (type) == 1
>> !          || TYPE_LENGTH (type) == 2
>> !          || TYPE_LENGTH (type) == 4
>> !          || TYPE_LENGTH (type) == 8);
>> ! }
>> !

Andrew> I'd add a FIXME pointing out known problems with the function. 
Andrew> Otherwize ok.

It's not i386nbsd_use_struct_convention() that needs a FIXME, as it
now properly identifies all functions which return structures via a
hidden pointer vs. those which return structures via registers.  It's
i386_extract_return_type() which doesn't know that structures with a
single float or double field are returned in floating point registers.

Andrew> I assume Mark is trying to figure out why NetBSD can't simply
Andrew> use a common i386_use_struct_convention function.  I take it
Andrew> from your answer, that NetBSD's convention isn't 100% standard
Andrew> (where standard would mean what someone other than Linux or
Andrew> *BSD did.  Solaris/x86?).

I don't think NetBSD does anything non-standard other than defining
DEFAULT_PCC_STRUCT_RETURN to 0 in its gcc config.  So this behavior
should be shared among all x86 targets that do the same: cygwin,
freebsd, linux-aout, and mach.

        --jtc

-- 
J.T. Conklin
RedBack Networks

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