[PATCH][ARM][PING] __ARM_FP & __ARM_NEON_FP defined when -march=armv7-m
Mantas Mikaitis
Mantas.Mikaitis@arm.com
Tue Jan 6 09:40:00 GMT 2015
Ping and changelog spaces removed.
Thank you,
Mantas M.
On 18/11/14 11:58, Richard Earnshaw wrote:
> On 18/11/14 11:30, Mantas Mikaitis wrote:
>> Incorrect predefinitions for certain target architectures. E.g. arm7-m
>> does not contain NEON but the defintion __ARM_NEON_FP was switched on.
>> Similarly with armv6 and even armv2.
>>
>> This patch fixes the predefines for each of the different chips
>> containing certain types of the FPU implementations.
>>
>> Tests:
>>
>> Tested on arm-none-linux-gnueabi and arm-none-linux-gnueabihf without
>> any new regression.
>>
>> Manually compiled for various targets and all correct definitions were
>> present.
>>
>> Is this patch ok for trunk?
>>
>> Mantas
>>
>> gcc/Changelog:
>>
>> * config/arm/arm.h (TARGET_NEON_FP): Removed conditional definition, define to zero if !TARGET_NEON.
>> (TARGET_CPU_CPP_BUILTINS): Added second condition before defining __ARM_FP macro.
>>
>>
>> ARM_DEFS.patch
>>
>>
>> diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
>> index ff4ddac..325fea9 100644
>> --- a/gcc/config/arm/arm.h
>> +++ b/gcc/config/arm/arm.h
>> @@ -118,7 +118,7 @@ extern char arm_arch_name[];
>> if (TARGET_VFP) \
>> builtin_define ("__VFP_FP__"); \
>> \
>> - if (TARGET_ARM_FP) \
>> + if (TARGET_ARM_FP && !TARGET_SOFT_FLOAT) \
> Wouldn't it be better to factor this into TARGET_ARM_FP? It seems odd
> that that macro returns a set of values based on something completely
> unavailable for the current compilation. That would also then mirror
> the behaviour of TARGET_NEON_FP (see below) and make the internal macros
> more consistent.
>
> R.
Thank you. Patch updated.
Ok for trunk?
Mantas M.
gcc/Changelog
2014-12-03 Mantas Mikaits <Mantas.Mikaitis@arm.com>
* config/arm/arm.h (TARGET_NEON_FP): Removed conditional definition, define to zero if !TARGET_NEON.
(TARGET_ARM_FP): Added !TARGET_SOFT_FLOAT into the conditional definition.
gcc/testsuite/ChangeLog:
* gcc.target/arm/macro_defs0.c: New test.
* gcc.target/arm/macro_defs1.c: New test.
* gcc.target/arm/macro_defs2.c: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mypatch.patch
Type: text/x-patch
Size: 2796 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150106/163a757d/attachment.bin>
More information about the Gcc-patches
mailing list