From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH 11/34] xen/arm: Introduce __builtin_stack_pointer Date: Wed, 26 Mar 2014 10:38:02 +0000 Message-ID: <5332AE0A.9080500@linaro.org> References: <1395766541-23979-1-git-send-email-julien.grall@linaro.org> <1395766541-23979-12-git-send-email-julien.grall@linaro.org> <1395767880.22808.4.camel@kazak.uk.xensource.com> <5331C48D.4040404@linaro.org> <1395829915.22808.38.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WSlDj-0006qo-Ee for xen-devel@lists.xenproject.org; Wed, 26 Mar 2014 10:38:07 +0000 Received: by mail-lb0-f172.google.com with SMTP id c11so1335762lbj.31 for ; Wed, 26 Mar 2014 03:38:05 -0700 (PDT) In-Reply-To: <1395829915.22808.38.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: xen-devel@lists.xenproject.org, tim@xen.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On 26/03/14 10:31, Ian Campbell wrote: > On Tue, 2014-03-25 at 18:01 +0000, Julien Grall wrote: >> Hi Ian, >> >> On 03/25/2014 05:18 PM, Ian Campbell wrote: >>> On Tue, 2014-03-25 at 16:55 +0000, Julien Grall wrote: >>>> Clang doesn't support named register. Introduce __builtin_stack_pointer >>>> to be able to use named register with gcc. >>> >>> I think gcc considers the __builtin namespace to be its own, not sure >>> about clang. >> >> I'm able to compile on GCC without any issue. > > That's not the point. The point of a namespacing rule is that gcc can > add such a function at any time it likes, and if that breaks your > application then that is tough luck. Thanks, I didn't find anything useful on internet about namespace. It seems the common rule is __foo is reserved by the compiler. >>> I think get_stack_pointer() would be a fine name for this macro. It >>> seems like the clang version should work for both gcc and clang. >>> >>> Google seems to suggest that __builtin_stack_pointer might become a real >>> compiler builtin at some point. >> >> I took the idea to the llvmlinux project: >> http://git.linuxfoundation.org/?p=llvmlinux.git;a=blob;f=arch/arm/patches/current_stack_pointer_arm.patch; >> >> But I can rename into get_stack_pointer for the next version. > > Sounds good, thanks. I will rename it and send the pathc. Regards, -- Julien Grall