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: [patch, nios2] stack limit checking improvements


On 07/14/2015 01:31 PM, Sandra Loosemore wrote:
2015-07-14  Sandra Loosemore  <sandra@codesourcery.com>

	gcc/
	* config/nios2/nios2.c (TEMP_REG_NUM): Move define up in file.
	(nios2_emit_stack_limit_check): Add size parameter.  Handle
	-fstack-limit-symbol as well as -fstack-limit-register.
	(nios2_expand_prologue): Emit only a single stack limit check,
	even if multiple stack adjustments are required.
	(nios2_option_override): Diagnose unsupported combination of -fpic
	and -stack-limit-symbol.

	gcc/testsuite/
	* gcc.target/nios2/nios2-stack-check-1.c: Adjust patterns.
	* gcc.target/nios2/nios2-stack-check-2.c: Likewise.
	* gcc.target/nios2/nios2-stack-check-3.c: New test case.

Ooops -- this patch caused a possibly-uninitialized-variable warning.(Mainline compiles had been very noisy with other random warnings while I was working on this, and it was easy to overlook one more warning....)
Anyway, fixed now with this followup patch.

-Sandra

2015-07-16  Sandra Loosemore  <sandra@codesourcery.com>

	gcc/
	* config/nios2/nios2.c (nios2_emit_stack_limit_check): Fix
	uninitialized-variable warning.
Index: gcc/config/nios2/nios2.c
===================================================================
--- gcc/config/nios2/nios2.c	(revision 225856)
+++ gcc/config/nios2/nios2.c	(working copy)
@@ -563,7 +563,7 @@ nios2_create_cfa_notes (rtx_insn *insn, 
 static void
 nios2_emit_stack_limit_check (int size)
 {
-  rtx sum;
+  rtx sum = NULL_RTX;
 
   if (GET_CODE (stack_limit_rtx) == SYMBOL_REF)
     {

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