patch-gcc_config_i386_i386_c 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. $OpenBSD: patch-gcc_config_i386_i386_c,v 1.2 2013/06/07 07:54:23 pascal Exp $
  2. --- gcc/config/i386/i386.c.orig Tue Apr 2 18:54:58 2013
  3. +++ gcc/config/i386/i386.c Sat Apr 13 16:20:31 2013
  4. @@ -2327,6 +2327,8 @@ struct ix86_frame
  5. HOST_WIDE_INT reg_save_offset;
  6. HOST_WIDE_INT sse_reg_save_offset;
  7. + HOST_WIDE_INT local_size;
  8. +
  9. /* When save_regs_using_mov is set, emit prologue using
  10. move instead of push instructions. */
  11. bool save_regs_using_mov;
  12. @@ -9230,6 +9232,7 @@ ix86_compute_frame_layout (struct ix86_frame *frame)
  13. HOST_WIDE_INT size = get_frame_size ();
  14. HOST_WIDE_INT to_allocate;
  15. + frame->local_size = size;
  16. frame->nregs = ix86_nsaved_regs ();
  17. frame->nsseregs = ix86_nsaved_sseregs ();
  18. @@ -10505,6 +10508,9 @@ ix86_expand_prologue (void)
  19. m->fs.sp_offset = INCOMING_FRAME_SP_OFFSET;
  20. m->fs.realigned = true;
  21. }
  22. +
  23. + if (warn_stack_larger_than && frame.local_size > stack_larger_than_size)
  24. + warning (OPT_Wstack_larger_than_, "stack usage is %d bytes", frame.local_size);
  25. if (frame_pointer_needed && !m->fs.fp_valid)
  26. {