[llvmlinux] Multiple storage class error

Tinti viniciustinti at gmail.com
Sat Nov 16 13:38:10 UTC 2013


I think we should change one of our patches to not use 'static register' as
comment in this link http://www.lemoda.net/c/keywords/register.html and
this one


 * how to get the current stack pointer in C



/* compiler has __builtin_stack_pointer support already */

#elif defined(__clang__)

#define __builtin_stack_pointer() ({ \

        unsigned long current_sp; \

        asm ("mov %0, sp" : "=r" (current_sp)); \

        current_sp; \


#define current_stack_pointer __builtin_stack_pointer()

#else /* gcc */

static register unsigned long current_stack_pointer asm ("sp");
#define __builtin_stack_pointer() current_stack_pointer


If we do so, we get kernel-gcc back to work on vexpress. What do you think?


Simplicity is the ultimate sophistication
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/llvmlinux/attachments/20131116/f29f222f/attachment.html>

More information about the LLVMLinux mailing list