This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

__arm macro meaning and purpose

Hi,

We observe that there are several macros being defined in ARMCLANG. It would be helpful, if we know the meaning or purpose of these macros and will help us to use these macros judiciously:

[11864215]__arm64
[11864216]__arm64__
[11903057]__arm
[11903060]__arm__

Thanks,
Malli

Parents
  • Hi Malli, 

    These are target identification macros and will be set for each respective target backend (AArch64, Arm (32 bit)). There is no functional difference between the __name__ and __name variants.

    It's worth noting that __arm64__ was/is a Darwin alternative to __aarch64__, and although the backends have since been merged, it seems that macro is still used to identify when you're using a darwin triple (iOS, watch etc). For e.g. compiling for "arm64-apple-ios".

    Hope this helps. 

    Best regards, 

    Peterson

Reply
  • Hi Malli, 

    These are target identification macros and will be set for each respective target backend (AArch64, Arm (32 bit)). There is no functional difference between the __name__ and __name variants.

    It's worth noting that __arm64__ was/is a Darwin alternative to __aarch64__, and although the backends have since been merged, it seems that macro is still used to identify when you're using a darwin triple (iOS, watch etc). For e.g. compiling for "arm64-apple-ios".

    Hope this helps. 

    Best regards, 

    Peterson

Children
No data