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: [PowerPC] -msdata=data needless use of .sbss section


>>>>> Alan Modra writes:

Alan> I looked at doing that, and couldn't convince myself that the size
Alan> calculated by rs6000_elf_in_small_data_p would always be the same
Alan> as that calculated by assemble_variable.  The former uses
Alan> int_size_in_bytes (TREE_TYPE (decl))
Alan> the latter,
Alan> tree_low_cst (DECL_SIZE_UNIT (decl), 1)

	For non-variable size types, int_size_in_bytes returns

  t = TYPE_SIZE_UNIT (type);
  return TREE_INT_CST_LOW (t);

tree_low_cst returns

  return TREE_INT_CST_LOW (t);

If DECL_SIZE_UNIT and TYPE_SIZE_UNIT don't match, I think we have more
problems.

David


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