This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] PowerPC select_section / unique_section
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Alan Modra <amodra at bigpond dot net dot au>, Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>, Geoff Keating <geoffk at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 04 Sep 2002 01:09:58 -0400
- Subject: Re: [RFC] PowerPC select_section / unique_section
>>>>> Richard Henderson writes:
Richard> I'm not fond of the ifdef. A boolean on the target structure
Richard> would be better IMO.
Okay, but what concerns me is the overlap between
targetm.in_small_data_p and the new targetm.readonly_small_data_p. The
logic will be split between those two, nested functions which will
interact in complicated and potentially confusing ways.
Can we combine the logic into targetm.in_small_data_p by adding a
readonly boolean parameter to the in_small_data_p call, e.g.,
else if ((*targetm.in_small_data_p) (decl, ret == SECCAT_RODATA))
and modifying the in_small_data_p functions in alpha and ia64 to return
false if the readonly argument is true? The ppc code can check on which
ABI is in effect. This way in_small_data_p controls whether the sdata
categorization code is executed for readonly objects removing the need for
the #ifdef.
Thanks, David