RE: [PATCH] Fix stack red zone bug (PR38644)

2011-10-09 Thread Jiangning Liu
> -Original Message- > From: Richard Sandiford > Date: Fri, Sep 30, 2011 at 8:46 PM > Subject: Re: [PATCH] Fix stack red zone bug (PR38644) > To: Jiangning Liu > Cc: Jakub Jelinek , Richard Guenther > , Andrew Pinski , > gcc-patches@gcc.gnu.org > > >

RE: [PATCH] Fix stack red zone bug (PR38644)

2011-10-09 Thread Jiangning Liu
> -Original Message- > From: Richard Guenther [mailto:richard.guent...@gmail.com] > Sent: Friday, September 30, 2011 8:57 PM > To: Jiangning Liu; Jakub Jelinek; Richard Guenther; Andrew Pinski; gcc- > patc...@gcc.gnu.org; richard.sandif...@linaro.org > Subject: Re: [PA

RE: [PATCH] Fix stack red zone bug (PR38644)

2011-10-09 Thread Jiangning Liu
> -Original Message- > From: Richard Henderson [mailto:r...@redhat.com] > Sent: Saturday, October 01, 2011 3:05 AM > To: Jiangning Liu > Cc: 'Jakub Jelinek'; 'Richard Guenther'; Andrew Pinski; gcc- > patc...@gcc.gnu.org > Subject: Re: [PATCH] Fi

Re: [PATCH] Fix stack red zone bug (PR38644)

2011-10-02 Thread Steven Bosscher
On Wed, Sep 28, 2011 at 11:10 AM, Jiangning Liu wrote: > 4) There are over 300 TARGET HOOKS being defined in target.def. I don't > think adding this interface is hurting GCC. The reason why there are so many, is because everyone thinks what you state here ;-) Ciao! Steven

Re: [PATCH] Fix stack red zone bug (PR38644)

2011-09-30 Thread Richard Henderson
@gcc.gnu.org >> Subject: Re: [PATCH] Fix stack red zone bug (PR38644) >> >> On Thu, Sep 29, 2011 at 06:08:50PM +0800, Jiangning Liu wrote: >>> As far as I know different back-ends are implementing different >>> prologue/epilogue in GCC. If one day this part can

Re: [PATCH] Fix stack red zone bug (PR38644)

2011-09-30 Thread Richard Sandiford
Richard Sandiford writes: > In contrast, after the tree optimisers have handed off the initial IL, um, I meant frontend :-) > the tree optimisers are more or less in full control. Richard

Re: [PATCH] Fix stack red zone bug (PR38644)

2011-09-30 Thread Richard Guenther
On Fri, Sep 30, 2011 at 2:46 PM, Richard Sandiford wrote: > "Jiangning Liu" writes: >>> You seem to feel strongly about this because it's a wrong-code bug that >>> is very easy to introduce and often very hard to detect.  And I >>> defintely >>> sympathise with that.  If we were going to to do it

Re: [PATCH] Fix stack red zone bug (PR38644)

2011-09-30 Thread Richard Sandiford
"Jiangning Liu" writes: >> You seem to feel strongly about this because it's a wrong-code bug that >> is very easy to introduce and often very hard to detect. And I >> defintely >> sympathise with that. If we were going to to do it in a target- >> independent >> way, though, I think it would be

RE: [PATCH] Fix stack red zone bug (PR38644)

2011-09-30 Thread Jiangning Liu
> -Original Message- > From: Richard Sandiford [mailto:rdsandif...@googlemail.com] > Sent: Friday, September 30, 2011 4:15 PM > To: Jiangning Liu > Cc: 'Jakub Jelinek'; 'Richard Guenther'; Andrew Pinski; gcc- > patc...@gcc.gnu.org > Subject: Re

Re: [PATCH] Fix stack red zone bug (PR38644)

2011-09-30 Thread Richard Sandiford
"Jiangning Liu" writes: >> -Original Message- >> From: Jakub Jelinek [mailto:ja...@redhat.com] >> Sent: Thursday, September 29, 2011 6:14 PM >> To: Jiangning Liu >> Cc: 'Richard Guenther'; Andrew Pinski; gcc-patches@gcc.gnu.org >&

RE: [PATCH] Fix stack red zone bug (PR38644)

2011-09-29 Thread Jiangning Liu
> -Original Message- > From: Jakub Jelinek [mailto:ja...@redhat.com] > Sent: Thursday, September 29, 2011 6:14 PM > To: Jiangning Liu > Cc: 'Richard Guenther'; Andrew Pinski; gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] Fix stack red zone bug (PR38644) >

Re: [PATCH] Fix stack red zone bug (PR38644)

2011-09-29 Thread Jakub Jelinek
On Thu, Sep 29, 2011 at 06:08:50PM +0800, Jiangning Liu wrote: > As far as I know different back-ends are implementing different > prologue/epilogue in GCC. If one day this part can be refined and abstracted > as well, I would say solving this stack-red-zone problem in shared > prologue/epilogue co

RE: [PATCH] Fix stack red zone bug (PR38644)

2011-09-29 Thread Jiangning Liu
> -Original Message- > From: Richard Guenther [mailto:richard.guent...@gmail.com] > Sent: Thursday, September 29, 2011 5:03 PM > To: Jiangning Liu > Cc: Andrew Pinski; gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] Fix stack red zone bug (PR38644) > > On Thu,

Re: [PATCH] Fix stack red zone bug (PR38644)

2011-09-29 Thread Richard Sandiford
Andrew Pinski writes: > On Mon, Sep 26, 2011 at 7:28 PM, Jiangning Liu wrote: >> >> Sorry, for this bug, I don’t see your valuable comments previously in either >> bug zilla and the [RFC] I sent out long time ago in gcc mail list. What I >> see is a bunch of people agreed this problem should be

Re: [PATCH] Fix stack red zone bug (PR38644)

2011-09-29 Thread Richard Guenther
>> >> Sent: Wednesday, September 28, 2011 5:20 PM >> >> To: Jiangning Liu >> >> Cc: Andrew Pinski; gcc-patches@gcc.gnu.org >> >> Subject: Re: [PATCH] Fix stack red zone bug (PR38644) >> >> >> >> On Wed, Sep 28, 2011 at

RE: [PATCH] Fix stack red zone bug (PR38644)

2011-09-28 Thread Jiangning Liu
> -Original Message- > From: Richard Guenther [mailto:richard.guent...@gmail.com] > Sent: Wednesday, September 28, 2011 5:56 PM > To: Jiangning Liu > Cc: Andrew Pinski; gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] Fix stack red zone bug (PR38644) > > On Wed,

Re: [PATCH] Fix stack red zone bug (PR38644)

2011-09-28 Thread Richard Guenther
>> >> Sent: Wednesday, September 28, 2011 4:39 PM >> >> To: Jiangning Liu >> >> Cc: Andrew Pinski; gcc-patches@gcc.gnu.org >> >> Subject: Re: [PATCH] Fix stack red zone bug (PR38644) >> >> >> >> On Wed, Sep 28, 2011 at 3:49 AM,

RE: [PATCH] Fix stack red zone bug (PR38644)

2011-09-28 Thread Jiangning Liu
> -Original Message- > From: Richard Guenther [mailto:richard.guent...@gmail.com] > Sent: Wednesday, September 28, 2011 5:20 PM > To: Jiangning Liu > Cc: Andrew Pinski; gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] Fix stack red zone bug (PR38644) > > On Wed,

Re: [PATCH] Fix stack red zone bug (PR38644)

2011-09-28 Thread Richard Guenther
] >> >> Sent: Tuesday, September 27, 2011 3:41 PM >> >> To: Jiangning Liu >> >> Cc: Andrew Pinski; gcc-patches@gcc.gnu.org >> >> Subject: Re: [PATCH] Fix stack red zone bug (PR38644) >> >> >> >> On Tue, Sep 27, 2011 at 5:32 AM, J

RE: [PATCH] Fix stack red zone bug (PR38644)

2011-09-28 Thread Jiangning Liu
> -Original Message- > From: Richard Guenther [mailto:richard.guent...@gmail.com] > Sent: Wednesday, September 28, 2011 4:39 PM > To: Jiangning Liu > Cc: Andrew Pinski; gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] Fix stack red zone bug (PR38644) > > On Wed,

Re: [PATCH] Fix stack red zone bug (PR38644)

2011-09-28 Thread Richard Guenther
rg >> Subject: Re: [PATCH] Fix stack red zone bug (PR38644) >> >> On Tue, Sep 27, 2011 at 5:32 AM, Jiangning Liu >> wrote: >> >> Think of it this way.  What the IR says is there is no barrier >> between >> >> those moves.  You either have an impli

Re: [PATCH] Fix stack red zone bug (PR38644)

2011-09-28 Thread Uros Bizjak
On Wed, Sep 28, 2011 at 8:42 AM, Jiangning Liu wrote: > Just realized ChangeLog needs to be changed as well. > > ChangeLog: > >        * config/i386/i386.c (ix86_using_red_zone): Remove inline. >        (TARGET_STACK_USING_RED_ZONE): New. >        * config/rs6000/rs6000.c (rs6000_stack_using_red_z

RE: [PATCH] Fix stack red zone bug (PR38644)

2011-09-27 Thread Jiangning Liu
.com; Richard Earnshaw; Matthew Gretton- > Dann > Subject: RE: [PATCH] Fix stack red zone bug (PR38644) > > > > -static inline bool > > > +extern bool > > > > static bool > > > > >  ix86_using_red_zone (void) > &

RE: [PATCH] Fix stack red zone bug (PR38644)

2011-09-27 Thread Jiangning Liu
> > -static inline bool > > +extern bool > > static bool > > >  ix86_using_red_zone (void) > >  { > >   return TARGET_RED_ZONE && !TARGET_64BIT_MS_ABI; > > @@ -35958,6 +35958,9 @@ ix86_autovectorize_vector_sizes (void) > >  #define TARGET_STACK_PROTECT_FAIL ix86_stack_protect_fail > >  #endif > >

RE: [PATCH] Fix stack red zone bug (PR38644)

2011-09-27 Thread Jiangning Liu
> -Original Message- > From: Richard Guenther [mailto:richard.guent...@gmail.com] > Sent: Tuesday, September 27, 2011 3:41 PM > To: Jiangning Liu > Cc: Andrew Pinski; gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] Fix stack red zone bug (PR38644) > > On Tue,

Re: [PATCH] Fix stack red zone bug (PR38644)

2011-09-27 Thread Richard Guenther
On Tue, Sep 27, 2011 at 5:32 AM, Jiangning Liu wrote: >> Think of it this way.  What the IR says is there is no barrier between >> those moves.  You either have an implicit barrier (which is what you >> are proposing) or you have it explicitly.  I think we all rather have >> more things explicit r

Re: [PATCH] Fix stack red zone bug (PR38644)

2011-09-27 Thread Uros Bizjak
On Tue, Sep 27, 2011 at 4:36 AM, Jiangning Liu wrote: > Fix a typo and CC x86/rs6000/arm ports maintainers. > > ChangeLog: > >        * config/i386/i386.c (ix86_stack_using_red_zone): Change inline >        to be extern. >        (TARGET_STACK_USING_RED_ZONE): New. >        * config/rs6000/rs6000.

RE: [PATCH] Fix stack red zone bug (PR38644)

2011-09-26 Thread Jiangning Liu
> Think of it this way. What the IR says is there is no barrier between > those moves. You either have an implicit barrier (which is what you > are proposing) or you have it explicitly. I think we all rather have > more things explicit rather than implicit in the IR. And that has > been the ove

Re: [PATCH] Fix stack red zone bug (PR38644)

2011-09-26 Thread Andrew Pinski
On Mon, Sep 26, 2011 at 7:28 PM, Jiangning Liu wrote: > > Sorry, for this bug, I don’t see your valuable comments previously in either > bug zilla and the [RFC] I sent out long time ago in gcc mail list. What I see > is a bunch of people agreed this problem should be fixed in middle end. The on

RE: [PATCH] Fix stack red zone bug (PR38644)

2011-09-26 Thread Jiangning Liu
Fix a typo and CC x86/rs6000/arm ports maintainers. ChangeLog: * config/i386/i386.c (ix86_stack_using_red_zone): Change inline to be extern. (TARGET_STACK_USING_RED_ZONE): New. * config/rs6000/rs6000.c (rs6000_stack_using_red_zone): New. (TARGET_STA

RE: [PATCH] Fix stack red zone bug (PR38644)

2011-09-26 Thread Jiangning Liu
> -Original Message- > From: Andrew Pinski [mailto:pins...@gmail.com] > Sent: Tuesday, September 27, 2011 5:31 AM > To: Jiangning Liu > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] Fix stack red zone bug (PR38644) > > On Mon, Sep 26, 2011 at 3:26 AM

Re: [PATCH] Fix stack red zone bug (PR38644)

2011-09-26 Thread Andrew Pinski
On Mon, Sep 26, 2011 at 3:26 AM, Jiangning Liu wrote: > This patch is fix PR38644, a 3-year-old bug. > > From the discussions in mail list and bugzilla, I think the middle end fix > is a common view. Although there are stills some gaps on how to fix it in > middle end, I think this patch at least

[PATCH] Fix stack red zone bug (PR38644)

2011-09-26 Thread Jiangning Liu
This patch is fix PR38644, a 3-year-old bug. >From the discussions in mail list and bugzilla, I think the middle end fix is a common view. Although there are stills some gaps on how to fix it in middle end, I think this patch at least moves the problem from back-end to middle-end, which makes GCC