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: [PING PATCH]: Fix PR 34013 save red-zone while stack probing for x86_64


Hello,

Thanks Uros, I will do that as you suggested.

Are there any comment from mingw, Danny ?

Cheers,
 i.A. Kai Tietz

|  (\_/)  This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.

------------------------------------------------------------------------------------------
  OneVision Software Entwicklungs GmbH & Co. KG
  Dr.-Leo-Ritter-StraÃe 9 - 93049 Regensburg
  Tel: +49.(0)941.78004.0 - Fax: +49.(0)941.78004.489 - www.OneVision.com
  Commerzbank Regensburg - BLZ 750 400 62 - Konto 6011050
  Handelsregister: HRA 6744, Amtsgericht Regensburg
  KomplementÃrin: OneVision Software Entwicklungs Verwaltungs GmbH
  Dr.-Leo-Ritter-StraÃe 9 â 93049 Regensburg
  Handelsregister: HRB 8932, Amtsgericht Regensburg - GeschÃftsfÃhrer: 
Ulrike DÃhler, Manuela Kluger

"Uros Bizjak" <ubizjak@gmail.com> wrote on 18.12.2007 16:41:55:

> Hello!
> 
> > 2007-12-13  Arthur Norman <acn1@cam.ac.uk>
> 
> >        * gcc/config/i386/i386.c: (ix86_expand_prologue): Save red-zone
> > while stack probing.
> 
> No gcc/ and no ":" before the function name. Perhaps more descriptive
> wording would be:
> 
> * config/i386/i386.c (ix86_expand_prologue): Do not use
> ix86_emit_save_regs_using_mov when
> "(! TARGET_STACK_PROBE || allocate < CHECK_STACK_LIMIT))"
> 
> Is it possible to construct a testcase from the code that was posted
> in the PR audit trai?
> 
> Also, "&&" shouold go in a new line, and please change the logic into
> something without double negations, perhaps into something as in the
> attached version of the patch.
> 
> Thanks,
> Uros.
> 
> Index: i386.c
> ===================================================================
> --- i386.c      (revision 131032)
> +++ i386.c      (working copy)
> @@ -6318,8 +6318,12 @@
>      allocate += frame.nregs * UNITS_PER_WORD;
> 
>    /* When using red zone we may start register saving before allocating
> -     the stack frame saving one cycle of the prologue.  */
> -  if (TARGET_RED_ZONE && frame.save_regs_using_mov)
> +     the stack frame saving one cycle of the prologue. However I will
> +     avoid doing this if I am going to have to probe the stack since
> +     at least on x86_64 the stack probe can turn into a call that 
clobbers
> +     a red zone location */
> +  if (TARGET_RED_ZONE && frame.save_regs_using_mov
> +      && (! TARGET_STACK_PROBE || allocate < CHECK_STACK_LIMIT))
>      ix86_emit_save_regs_using_mov (frame_pointer_needed ?
> hard_frame_pointer_rtx
>                                    : stack_pointer_rtx,
>                                    -frame.nregs * UNITS_PER_WORD);
> @@ -6375,7 +6379,9 @@
>         }
>      }
> 
> -  if (frame.save_regs_using_mov && !TARGET_RED_ZONE)
> +  if (frame.save_regs_using_mov
> +      && !(TARGET_RED_ZONE
> +          && (! TARGET_STACK_PROBE || allocate < CHECK_STACK_LIMIT)))
>      {
>        if (!frame_pointer_needed || !frame.to_allocate)
>          ix86_emit_save_regs_using_mov (stack_pointer_rtx, 
frame.to_allocate);
> 
> 
> The patch is OK (but please wait for possible comments from mingw 
maintainer)
> 


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