Skip to content

Commit 2769545

Browse files
committed
specify s390x target features
1 parent 00405f8 commit 2769545

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

src/attributes/codegen.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,30 @@ Feature | Implicitly Enables | Description
506506
[tail-call]: https://github.com/webassembly/tail-call
507507
[multivalue]: https://github.com/webassembly/multi-value
508508

509+
r[attributes.codegen.target_feature.s390x]
510+
#### `s390x`
511+
512+
On this platform the usage of `#[target_feature]` functions follows the [above restrictions][attributes.codegen.target_feature.safety-restrictions].
513+
514+
Further documentation on these features can be found in the "Additions to z/Architecture" section of Chapter 1 of the [Principles of Operation].
515+
516+
Feature | Implicitly Enables | Description
517+
---------------------------------------|---------------------------------------|---------------------
518+
`vector` | | 128-bit vector instructions
519+
`vector-enhancements-1` | `vector` | vector enhancements 1
520+
`vector-enhancements-2` | `vector-enhancements-1` | vector enhancements 2
521+
`vector-enhancements-3` | `vector-enhancements-2` | vector enhancements 3
522+
`vector-packed-decimal` | `vector` | vector packed-decimal
523+
`vector-packed-decimal-enhancement` | `vector-packed-decimal` | vector packed-decimal enhancement
524+
`vector-packed-decimal-enhancement-2` | `vector-packed-decimal-enhancement-2` | vector packed-decimal enhancement 2
525+
`vector-packed-decimal-enhancement-3` | `vector-packed-decimal-enhancement-3` | vector packed-decimal enhancement 3
526+
`nnp-assist` | `vector` | nnp assist
527+
`miscellaneous-extensions-2` | | miscellaneous extensions 2
528+
`miscellaneous-extensions-3` | | miscellaneous extensions 3
529+
`miscellaneous-extensions-4` | | miscellaneous extensions 4
530+
531+
[Principles of Operation]: https://publibfp.dhe.ibm.com/epubs/pdf/a227832d.pdf
532+
509533
r[attributes.codegen.target_feature.info]
510534
### Additional information
511535

@@ -516,8 +540,7 @@ that this option is not affected by the `target_feature` attribute, and is
516540
only driven by the features enabled for the entire crate.
517541

518542
r[attributes.codegen.target_feature.remark-rt]
519-
See the [`is_x86_feature_detected`] or [`is_aarch64_feature_detected`] macros
520-
in the standard library for runtime feature detection on these platforms.
543+
Whether a feature is enabled can be checked at runtime using a platform-specific macro from the standard library, for instance [`is_x86_feature_detected`] or [`is_aarch64_feature_detected`].
521544

522545
> [!NOTE]
523546
> `rustc` has a default set of features enabled for each target and CPU. The CPU may be chosen with the [`-C target-cpu`] flag. Individual features may be enabled or disabled for an entire crate with the [`-C target-feature`] flag.

0 commit comments

Comments
 (0)