ARM-software / acle

Arm C Language Extensions (ACLE)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[proposal] Add __ARM_FEATURE macros for more ISA features

rsandifo-arm opened this issue · comments

I hear that there was previously a principle that we would only add __ARM_FEATURE macros for features that have associated C/C++ intrinsics. However:

  • This is inconvenient for users who want to use other features in inline asm.
  • Some features do not add new intrinsics or language constructs, but do improve the performance of existing constructs. Users might want to test for such features too.

There are already macros like __ARM_FEATURE_ATOMICS that have no associated intrinsics. #199 adds another case. There are probably more macros besides these two (I've not gone through all the features to check).

It would be good if we retroactively added macros for existing “relevant” ISA features, to improve consistency. This probably needs a policy decision about where the new line should be drawn. E.g.:

  1. all features with a FEAT_ identification
  2. all features that have associated instructions, system registers, DC encodings, etc.
  3. all features that have associated instructions

(1) feels a bit overboard, but both (2) and (3) seem plausible.

I think it would make sense to align to the level of granularity that the (still beta) Function Multi-versioning spec uses