diff --git a/src/attributes/codegen.md b/src/attributes/codegen.md index a68e46626..37713c0c9 100644 --- a/src/attributes/codegen.md +++ b/src/attributes/codegen.md @@ -47,7 +47,7 @@ assumed to exist. ## The `target_feature` attribute -The *`target_feature` [attribute]* may be applied to an [unsafe function] to +The *`target_feature` [attribute]* may be applied to a function to enable code generation of that function for specific platform architecture features. It uses the [_MetaListNameValueStr_] syntax with a single key of `enable` whose value is a string of comma-separated feature names to enable. @@ -75,6 +75,9 @@ The following is a list of the available feature names. #### `x86` or `x86_64` +This platform requires that `#[target_feature]` is only applied to [`unsafe` +functions][unsafe function]. + Feature | Implicitly Enables | Description ------------|--------------------|------------------- `aes` | `sse2` | [AES] — Advanced Encryption Standard @@ -128,6 +131,17 @@ Feature | Implicitly Enables | Description [`xsaveopt`]: https://www.felixcloutier.com/x86/xsaveopt [`xsaves`]: https://www.felixcloutier.com/x86/xsaves +#### `wasm32` or `wasm64` + +This platform allows `#[target_feature]` to be applied to both safe and +[`unsafe` functions][unsafe function]. + +Feature | Description +------------|------------------- +`simd128` | [WebAssembly simd proposal][simd128] + +[simd128]: https://github.com/webassembly/simd + ### Additional information See the [`target_feature` conditional compilation option] for selectively