Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[proposal] Make intrinsics are available regardless of feature macros #200

Open
DanielKristofKiss opened this issue Jun 23, 2022 · 0 comments
Labels

Comments

@DanielKristofKiss
Copy link
Contributor

Availability of an intrinsic is sometimes gated on a feature macro like: __ARM_FEATURE_RNG. these macros only turned on when the compilation unit compiled for a given architecture e.g. with march flag.

A given function may compiled for a specific target feature and the availability check is done in runtime.

__attribute__((target("rand")))
void foo(void){
// __rndr() can't be used here. 
}

Some implementation already allows such a behaviour to favour intrinsics use instead of inline assembly.
Some code manually enables these feature macros just to make the above example code compile.

Proposal: Make all intrinsics always available. Keep the feature macros to keep the indication of general use of the feature.

Compilers may still validate the availability of the instruction in a given context but still the developer is responsible of the correct use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants