From: Chuck Ebbert <cebbert.lkml@gmail.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86: Clean up stack access code in irq_32.c
Date: Sun, 12 Oct 2014 14:34:22 -0500 [thread overview]
Message-ID: <20141012143422.5b9bb40e@as> (raw)
In-Reply-To: <EF2BF2D8-F612-4812-AF96-05944AE0200C@zytor.com>
On Sun, 12 Oct 2014 10:13:33 -0700
"H. Peter Anvin" <hpa@zytor.com> wrote:
> That's not a justification for change. Claiming no harm is nevessary but not sufficient.
>
The optimization is also a little better with GCC when using C
instead of asm for current_stack_pointer. Probably not enough better
to do different macros for gcc and other compilers though.
clang actually moves %esp to memory and then into another register
instead of moving it directly when using the current macro. Their
optimizer really needs some work...
> On October 12, 2014 9:53:32 AM PDT, Chuck Ebbert <cebbert.lkml@gmail.com> wrote:
> >On Sun, 12 Oct 2014 09:47:53 -0700
> >"H. Peter Anvin" <hpa@zytor.com> wrote:
> >
> >[replying to the list this time, sigh]
> >
> >> We changed this to asm because the C broke some compilers. Why are
> >you changing it back?
> >>
> >
> >The C broke some compilers because it was using a global register
> >variable. This is a local one, which the clang documentation says is
> >supported. And I compiled it with clang with no problem.
> >
> >> On October 12, 2014 9:43:53 AM PDT, Chuck Ebbert
> ><cebbert.lkml@gmail.com> wrote:
> >> >Use C instead of asm for accessing the stack pointer. And define
> >some
> >> >macros to make the code easier to understand.
> >> >
>
prev parent reply other threads:[~2014-10-12 19:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-12 16:43 [PATCH] x86: Clean up stack access code in irq_32.c Chuck Ebbert
2014-10-12 16:47 ` H. Peter Anvin
2014-10-12 16:53 ` Chuck Ebbert
2014-10-12 17:00 ` Jeff Epler
2014-10-12 17:40 ` Chuck Ebbert
2014-10-12 17:13 ` H. Peter Anvin
2014-10-12 19:34 ` Chuck Ebbert [this message]
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=20141012143422.5b9bb40e@as \
--to=cebbert.lkml@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.