lkml.org 
[lkml]   [2016]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] powerpc: inline current_stack_pointer()
On Tue, May 24, 2016 at 07:39:59AM +0200, Christophe Leroy wrote:
> >>+static inline unsigned long current_stack_pointer(void)
> >>+{
> >>+ register unsigned long *ptr asm("r1");
> >>+
> >>+ return *ptr;
> >>+}
> >Register asm is only guaranteed to work as input to inline asm. NAK.
> >
> Does it mean that the following declaration in
> arch/powerpc/include/asm/paca.h is wrong too ?
>
> register struct paca_struct *local_paca asm("r13");

That one is fine, because it is a global var.

https://gcc.gnu.org/onlinedocs/gcc/Explicit-Register-Variables.html


Segher

\
 
 \ /
  Last update: 2016-05-24 08:21    [W:0.125 / U:0.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site