You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
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.
The text was updated successfully, but these errors were encountered: