Module target_features

Source

Functionsยง

asm_target_features ๐Ÿ”’
Computes the set of target features used in a function for the purposes of inline assembly.
cfg_target_feature
Utility function for a codegen backend to compute cfg(target_feature), or more specifically, to populate sess.unstable_target_features and sess.target_features (these are the first and 2nd component of the return value, respectively).
check_target_feature_trait_unsafe ๐Ÿ”’
Checks the function annotated with #[target_feature] is not a safe trait method implementation, reporting an error if it is.
check_tied_features
Given a map from target_features to whether they are enabled or disabled, ensure only valid combinations are allowed.
flag_to_backend_features
Translates the -Ctarget-feature flag into a backend target feature list.
from_target_feature_attr ๐Ÿ”’
Compute the enabled target features from the #[target_feature] function attribute. Enabled target features are added to target_features.
parse_rust_feature_flag ๐Ÿ”’
Parse the value of -Ctarget-feature, also expanding implied features, and call the closure for each (expanded) Rust feature. If the list contains a syntactically invalid item (not starting with +/-), the error callback is invoked.
provide ๐Ÿ”’
retpoline_features_by_flags
Computes the backend target features to be added to account for retpoline flags. Used by both LLVM and GCC since their target features are, conveniently, the same.