From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10918 invoked by alias); 4 Nov 2010 15:44:59 -0000 Received: (qmail 10909 invoked by uid 22791); 4 Nov 2010 15:44:58 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from eu1sys200aog120.obsmtp.com (HELO eu1sys200aog120.obsmtp.com) (207.126.144.149) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 04 Nov 2010 15:44:53 +0000 Received: from source ([167.4.1.35]) (using TLSv1) by eu1sys200aob120.postini.com ([207.126.147.11]) with SMTP ID DSNKTNLU8P+7TORDAxh10AYxWIAZDcjNXJAQ@postini.com; Thu, 04 Nov 2010 15:44:52 UTC Received: from zeta.dmz-us.st.com (ns4.st.com [167.4.80.115]) by beta.dmz-us.st.com (STMicroelectronics) with ESMTP id 5912A156; Thu, 4 Nov 2010 15:44:47 +0000 (GMT) Received: from Webmail-eu.st.com (safex1hubcas6.st.com [10.75.90.73]) by zeta.dmz-us.st.com (STMicroelectronics) with ESMTP id 89D1A1B3; Thu, 4 Nov 2010 15:44:46 +0000 (GMT) Received: from [164.129.122.40] (164.129.122.40) by webmail-eu.st.com (10.75.90.13) with Microsoft SMTP Server (TLS) id 8.2.234.1; Thu, 4 Nov 2010 16:44:40 +0100 Message-ID: <4CD2D4E8.6030304@st.com> Date: Thu, 04 Nov 2010 15:44:00 -0000 From: Christophe Lyon User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.11) Gecko/20101013 Lightning/1.0b2 Thunderbird/3.1.5 MIME-Version: 1.0 To: Nick Clifton Cc: Binutils Subject: Re: [ARM] How to query gas for target properties? References: <4CBBF909.8040206@st.com> <4CC82CF9.5000007@redhat.com> In-Reply-To: <4CC82CF9.5000007@redhat.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2010-11/txt/msg00089.txt.bz2 On 27.10.2010 15:45, Nick Clifton wrote: > Hi Christophe, > >> I'd like to write an assembly code fragment with some parts conditional >> to some target properties. >> For instance, on ARM, I'd like to know if the target has the Neon >> extension, ie gas if gas was invoked with -mfpu=neon. >> >> I have been able to perform some other conditions (eg architecture >> variant) through cpp, but I have found nothing enabling to know that >> -mfpu=neon was used. > > Probably the easiest method would be to write the code in C as extended > assembler statements and check for the presence of the __ARM_NEON__ > preprocessor variable. > Thanks for you answer, that's what I had ended up doing. My 1st attempts at using this macro failed because I didn't use -mhardfp; I don't know why -mfpu=neon isn't sufficient to get __ARM_NEON__ defined by GCC. Thanks Christophe.