+2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
+
+ PR target/82411
+ * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
+ readonly data in sdata, if that is disabled.
+ * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
+ * doc/invoke.texi (RS/6000 and PowerPC Options): Document
+ -mreadonly-in-sdata option.
+
2018-03-07 Martin Sebor <msebor@redhat.com>
PR tree-optimization/84468
}
else
{
+ /* If we are told not to put readonly data in sdata, then don't. */
+ if (TREE_READONLY (decl) && rs6000_sdata != SDATA_EABI
+ && !rs6000_readonly_in_sdata)
+ return false;
+
HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (decl));
if (size > 0
Target RejectNegative Joined Var(rs6000_sdata_name)
Select method for sdata handling.
+mreadonly-in-sdata
+Target Report Var(rs6000_readonly_in_sdata) Init(1) Save
+Allow readonly data in sdata.
+
mtls-size=
Target RejectNegative Joined Var(rs6000_tls_size) Enum(rs6000_tls_size)
Specify bit size of immediate TLS offsets.
-mdlmzb -mno-dlmzb @gol
-mprototype -mno-prototype @gol
-msim -mmvme -mads -myellowknife -memb -msdata @gol
--msdata=@var{opt} -mvxworks -G @var{num} @gol
+-msdata=@var{opt} -mreadonly-in-sdata -mvxworks -G @var{num} @gol
-mrecip -mrecip=@var{opt} -mno-recip -mrecip-precision @gol
-mno-recip-precision @gol
-mveclibabi=@var{type} -mfriz -mno-friz @gol
in the @code{.data} section, and all uninitialized data in the
@code{.bss} section.
+@item -mreadonly-in-sdata
+@itemx -mreadonly-in-sdata
+@opindex mreadonly-in-sdata
+@opindex mno-readonly-in-sdata
+Put read-only objects in the @code{.sdata} section as well. This is the
+default.
+
@item -mblock-move-inline-limit=@var{num}
@opindex mblock-move-inline-limit
Inline all block moves (such as calls to @code{memcpy} or structure
+2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
+
+ PR target/82411
+ * gcc.target/powerpc/ppc-sdata-2.c: Skip if -mno-readonly-in-sdata.
+
2018-03-07 Martin Sebor <msebor@redhat.com>
PR tree-optimization/84468
/* { dg-final { scan-assembler-not "\\.section\[ \t\]\\.sdata2," } } */
/* { dg-final { scan-assembler "sdat@sdarel\\(13\\)" } } */
/* { dg-final { scan-assembler "sdat2@sdarel\\(13\\)" } } */
+/* { dg-skip-if "" { *-*-* } { "-mno-readonly-in-sdata" } { "" } } */
int sdat = 2;