This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: SH atomic asms in glibc and the stack pointer
- From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: joseph at codesourcery dot com
- Cc: gcc-patches at gcc dot gnu dot org, libc-alpha at sourceware dot org, aoliva at redhat dot com, drepper at gmail dot com
- Date: Wed, 30 Nov 2011 07:44:25 +0900 (JST)
- Subject: Re: SH atomic asms in glibc and the stack pointer
- References: <Pine.LNX.4.64.1111291659160.26895@digraph.polyomino.org.uk>
"Joseph S. Myers" <joseph@codesourcery.com> wrote:
> This asm doesn't tell the compiler that r15 is temporarily saved and
> restored, and marking it as clobbering the stack pointer is unlikely to
> work. It might be possible to avoid problems by marking all the inputs
> that are used while the stack pointer has its special value as being
> read/write operands, so they do not get assigned to the stack pointer, or
> by clobbering additional fixed registers that are used to load the input
> values at the start of the asm. But both of these seem inefficient
> (requiring extra registers to be allocated) when what's actually required
> is simply to allocate the inputs to any register other than r15. So in my
> view the best fix is to add a new constraint that means "any
> general-purpose register other than r15" and to use it in glibc when the
> compiler version is new enough. That is what these GCC and glibc patches
> do. Comments? OK?
OK. Thanks for fixing this!
Uli, could you please approve the libc patch?
Regards,
kaz