Commit c0d6cb1a by Segher Boessenkool Committed by Segher Boessenkool

rs6000: Don't forget to initialize the TOC (PR77957)

The code generating traceback tables mistakenly does an early return
if !optional_tbtab, which causes it to miss the code generating the TOC
section.  This only matters if the TOC will be empty since otherwise
the section is created elsewhere.

This patch fixes it.


	PR target/77957
	* config/rs6000/rs6000.c (rs6000_output_function_epilogue): Don't
	return early if !optional_tbtab.

From-SVN: r242336
parent b93d8a3f
2016-11-12 Segher Boessenkool <segher@kernel.crashing.org>
PR target/77957
* config/rs6000/rs6000.c (rs6000_output_function_epilogue): Don't
return early if !optional_tbtab.
2016-11-11 Eric Botcazou <ebotcazou@adacore.com>
PR rtl-optimization/59461
......@@ -30412,17 +30412,17 @@ rs6000_output_function_epilogue (FILE *file,
seems to set the bit when not optimizing. */
fprintf (file, "%d\n", ((float_parms << 1) | (! optimize)));
if (! optional_tbtab)
return;
if (optional_tbtab)
{
/* Optional fields follow. Some are variable length. */
/* Parameter types, left adjusted bit fields: 0 fixed, 10 single float,
11 double float. */
/* There is an entry for each parameter in a register, in the order that
they occur in the parameter list. Any intervening arguments on the
stack are ignored. If the list overflows a long (max possible length
34 bits) then completely leave off all elements that don't fit. */
/* Parameter types, left adjusted bit fields: 0 fixed, 10 single
float, 11 double float. */
/* There is an entry for each parameter in a register, in the order
that they occur in the parameter list. Any intervening arguments
on the stack are ignored. If the list overflows a long (max
possible length 34 bits) then completely leave off all elements
that don't fit. */
/* Only emit this long if there was at least one parameter. */
if (fixed_parms || float_parms)
fprintf (file, "\t.long %d\n", parm_info);
......@@ -30460,6 +30460,7 @@ rs6000_output_function_epilogue (FILE *file,
fputs ("\t.align 2\n", file);
}
}
/* Arrange to define .LCTOC1 label, if not already done. */
if (need_toc_init)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment