This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [ARM] How to query gas for target properties?
- From: Christophe Lyon <christophe dot lyon at st dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Thu, 4 Nov 2010 16:44:40 +0100
- Subject: Re: [ARM] How to query gas for target properties?
- References: <4CBBF909.8040206@st.com> <4CC82CF9.5000007@redhat.com>
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.