Re: register long sp asm("r1") incorrect

From: H. Peter Anvin
Date: Mon Feb 15 2010 - 17:18:53 EST


On 02/15/2010 01:04 PM, Benjamin Herrenschmidt wrote:
>
> It's true that most other use of it we have are global scope (local_paca
> in r13, glibc use of r2/r13, etc...) afaik, but since r1 itself is the
> stack pointer always, I think they pretty much guarantee it works.
>

It should work, because r1, being the stack pointer, is already marked a
reserved register in gcc.

The reference Pavel is citing bascially states that gcc won't globally
reserve the register, which is true, but it is already reserved anyway.

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/