[Bug target/63281] powerpc64le creates 64 bit constants from scratch instead of loading them

amodra at gmail dot com gcc-bugzilla@gcc.gnu.org
Wed Sep 17 06:32:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63281

--- Comment #2 from Alan Modra <amodra at gmail dot com> ---
Created attachment 33504
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33504&action=edit
this moves constants from the toc to rodata

For -mcmodel=medium it is just as efficient to load a constant from .rodata as
it is from .toc, so keep all constants out of the TOC.  (FP is already excluded
by defauls selected for -mcmodel=medium).  These constants are actually put
into .rodata.cst8, so there is some chance they might be merged with an
identical constant in another object file, which is a win over putting them in
.toc.  Also, this means .toc should only contain addresses, necessary for the
current ppc64 linux kernel that wants to relocate .toc en masse.



More information about the Gcc-bugs mailing list