__ARM_PROFILE_M__ __CORE__ __ARMVFP__ __LITTLE_ENDIAN__

本文深入解析了ARM处理器架构的几个关键参数:ARM_PROFILE_M、CORE、ARMVFP、LITTLE_ENDIAN,详细阐述了它们的含义、作用及如何通过符号名称识别不同类型的ARM核心。此外,文章还介绍了如何根据处理器的特性选择合适的编译选项。

__ARM_PROFILE_M__

Description

An integer that is set based on the --cpu option.

The symbol is set to 1 if the selected processor architecture is a profile M core.

The symbol is undefined for other cores.

 

__CORE__

Description

An integer that identifies the processor architecture in use.

These symbolic names can be used when testing the __CORE__ symbol.

An integer that identifies the chip core in use. The value reflects the setting of the --cpu option and is defined to

__ARM4TM__, __ARM5__, __ARM5E__, __ARM6__, __ARM6M__, __ARM6SM__, __ARM7M__, __ARM7EM__, __ARM7A__, or __ARM7R___.

These symbolic names can be used when testing the __CORE__ symbol.

The symbol reflects the --core option and is defined to

#define __ARM7A__     0
#define __ARM7R__     0
#define __ARM4TM__    4
#define __ARM5__      5
#define __ARM5T__     5
#define __ARM5TM__    5
#define __ARM6T2__    6
#define __ARM6__      6
#define __ARM7M__     7
#define __ARM7__      7
#define __ARM5E__     10
#define __ARM6M__     11
#define __ARM6SM__    12
#define __ARM7EM__    13

 

__ARMVFP__

Description

An integer that reflects the --fpu option and is defined to

__ARMVFPV1__ ( 1 ),
__ARMVFPV2__ ( 2 ),
__ARMVFPV3__ ( 3 ),
__ARMVFPV4__ ( 4 ).

These symbolic names can be used when testing the __ARMVFP__ symbol.

If VFP code generation is disabled (default), the symbol will be undefined.

 

__LITTLE_ENDIAN__

Description

An integer that reflects the --endian option and is defined to 1 when the byte order is little-endian.
The symbol is defined to 0 when the byte order is big-endian.

 

转载于:https://www.cnblogs.com/shangdawei/p/3515180.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值