public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Haley <aph@redhat.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Jeff Law <law@redhat.com>,
	rostedt@goodmis.org,         "H. Peter Anvin" <hpa@zytor.com>,
	        David Daney <ddaney@caviumnetworks.com>,
	        Linus Torvalds <torvalds@linux-foundation.org>,
	        Richard Guenther <richard.guenther@gmail.com>,
	        Ingo Molnar <mingo@elte.hu>,
	LKML <linux-kernel@vger.kernel.org>,
	        Andrew Morton <akpm@linux-foundation.org>,
	        Heiko Carstens <heiko.carstens@de.ibm.com>,
	feng.tang@intel.com,
	        Fr??d??ric Weisbecker <fweisbec@gmail.com>,
	        Peter Zijlstra <peterz@infradead.org>,
	jakub@redhat.com,         gcc@gcc.gnu.org
Subject: Re: BUG: GCC-4.4.x changes the function frame on some functions
Date: Fri, 20 Nov 2009 12:23:00 -0000	[thread overview]
Message-ID: <4B068A10.2090608@redhat.com> (raw)
In-Reply-To: <4B0685B7.4060601@redhat.com>

Andrew Haley wrote:
> Thomas Gleixner wrote:
> 
>> While testing various kernel configs we found out that the problem
>> comes and goes. Finally I started to compare the gcc command line
>> options and after some fiddling it turned out that the following
>> minimal deltas change the code generator behaviour:
>>
>> Bad:  -march=pentium-mmx                -Wa,-mtune=generic32
>> Good: -march=i686        -mtune=generic -Wa,-mtune=generic32
>> Good: -march=pentium-mmx -mtune-generic -Wa,-mtune=generic32
>>
>> I'm not supposed to understand the logic behind that, right ?
> 
> I don't either.  I'm seeing:
> 
> timer_stats_update_stats:                                       timer_stats_update_stats:
>         pushl   %edi                                          <
>         leal    8(%esp), %edi                                 <
>         andl    $-16, %esp                                    <
>         pushl   -4(%edi)                                      <
>         pushl   %ebp                                                    pushl   %ebp
>         movl    %esp, %ebp                                              movl    %esp, %ebp
>         pushl   %edi                                          |         andl    $-16, %esp
>         pushl   %esi                                          |         subl    $112, %esp
>         pushl   %ebx                                          |         movl    %ebx, 100(%esp)
>         subl    $108, %esp                                    |         movl    %esi, 104(%esp)
>                                                               >         movl    %edi, 108(%esp)
>         call    mcount                                                  call    mcount
> 
> where the only difference is -mtune=generic.  I'm investigating.

Forget that, I see from the gcc-bugs list that hj has tracked it down to
the use of DRAP, and for some reason the mtune options affect that.  He's
the best person to fix this.

Andrew.

  reply	other threads:[~2009-11-20 12:23 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-19 21:16 H. Peter Anvin
2009-11-19 21:26 ` Jeff Law
2009-11-19 22:44   ` Steven Rostedt
2009-11-20  0:00     ` Jeff Law
2009-11-20  0:37       ` Thomas Gleixner
2009-11-20  1:00         ` Linus Torvalds
2009-11-20  1:29           ` Thomas Gleixner
2009-11-20  2:16             ` Thomas Gleixner
2009-11-20  1:30           ` H. Peter Anvin
2009-11-20  5:40           ` Ingo Molnar
2009-11-20 12:06         ` Andrew Haley
2009-11-20 12:23           ` Andrew Haley [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-11-19 20:50 H. Peter Anvin
     [not found] <alpine.LFD.2.00.0911181933540.24119@localhost.localdomain>
     [not found] ` <tip-887a29f59b93cf54e21814869a4ab6e80b6fa623@git.kernel.org>
     [not found]   ` <20091119072040.GA23579@elte.hu>
     [not found]     ` <alpine.LFD.2.00.0911191053390.24119@localhost.localdomain>
     [not found]       ` <alpine.LFD.2.00.0911191423190.24119@localhost.localdomain>
2009-11-19 15:39         ` Thomas Gleixner
2009-11-19 15:45           ` Andrew Haley
2009-11-19 15:55             ` H. Peter Anvin
2009-11-19 15:59               ` Richard Guenther
2009-11-19 16:03             ` Steven Rostedt
2009-11-19 16:13               ` H. Peter Anvin
2009-11-19 16:20               ` Frederic Weisbecker
2009-11-19 16:07             ` Thomas Gleixner
2009-11-19 16:19               ` Andrew Haley
2009-11-19 16:45                 ` Thomas Gleixner
2009-11-19 16:13             ` Steven Rostedt
2009-11-19 15:46           ` H. Peter Anvin
2009-11-19 15:51             ` Richard Guenther
2009-11-19 15:53               ` Richard Guenther
2009-11-19 17:38               ` Andi Kleen
2009-11-19 17:41           ` Linus Torvalds
2009-11-19 17:52             ` Thomas Gleixner
2009-11-19 18:00             ` Steven Rostedt
2009-11-19 18:04               ` Richard Guenther
2009-11-19 18:23                 ` Andrew Haley
2009-11-19 18:42                   ` Linus Torvalds
2009-11-19 18:45                     ` Linus Torvalds
2009-11-19 18:56                       ` Linus Torvalds
2009-11-19 19:03                         ` Thomas Gleixner
2009-11-23  9:17                           ` Jakub Jelinek
2009-11-23  9:53                             ` Thomas Gleixner
2009-11-19 19:12                         ` David Daney
2009-11-19 19:29                           ` Steven Rostedt
2009-11-19 19:47                             ` Frederic Weisbecker
2009-11-19 19:55                               ` Kai Tietz
2009-11-19 20:06                                 ` Frederic Weisbecker
2009-11-19 20:06                               ` Steven Rostedt
2009-11-19 20:18                                 ` Steven Rostedt
2009-11-19 20:29                                   ` Frederic Weisbecker
2009-11-19 20:26                                 ` Frederic Weisbecker
2009-11-19 20:38                                   ` Linus Torvalds
2009-11-19 20:45                                     ` Steven Rostedt
2009-11-19 19:51                             ` H. Peter Anvin
2009-11-19 20:08                               ` Linus Torvalds
2009-11-19 21:13                                 ` Jeff Law
2009-11-19 20:11                               ` Steven Rostedt
2009-11-19 21:07                               ` Jeff Law
2009-11-19 18:34                 ` Thomas Gleixner
2009-11-19 18:40                 ` Linus Torvalds
2009-11-19 18:48                   ` Ingo Molnar
2009-11-19 19:08                     ` Steven Rostedt
2009-11-19 19:51                       ` Ingo Molnar
2009-11-19 20:37                   ` Thomas Gleixner
2009-11-19 18:22           ` Andrew Haley
2009-11-19 18:34             ` Steven Rostedt
2009-11-19 18:37               ` Andrew Pinski
2009-11-19 18:38               ` H. Peter Anvin
2009-11-19 18:38               ` Andrew Haley
2009-11-19 18:40             ` Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B068A10.2090608@redhat.com \
    --to=aph@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=ddaney@caviumnetworks.com \
    --cc=feng.tang@intel.com \
    --cc=fweisbec@gmail.com \
    --cc=gcc@gcc.gnu.org \
    --cc=heiko.carstens@de.ibm.com \
    --cc=hpa@zytor.com \
    --cc=jakub@redhat.com \
    --cc=law@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=richard.guenther@gmail.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).