This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [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


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