From f07ba4652fd0119652fe0c791208fdb2a2cf2077 Mon Sep 17 00:00:00 2001 From: WANG Rui Date: Fri, 3 Jan 2025 14:59:38 +0800 Subject: [PATCH] Doc: Add the LoongArch stabilized target features --- src/attributes/codegen.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/attributes/codegen.md b/src/attributes/codegen.md index 297d6436f..6c0a65086 100644 --- a/src/attributes/codegen.md +++ b/src/attributes/codegen.md @@ -230,6 +230,27 @@ Feature | Implicitly Enables | Feature Name `tme` | | FEAT_TME --- Transactional Memory Extension `vh` | | FEAT_VHE --- Virtualization Host Extensions +#### `loongarch` + +r[attributes.codegen.target_feature.loongarch] + +This platform requires that `#[target_feature]` is only applied to [`unsafe` +functions][unsafe function]. + +Further documentation on these features can be found in the [LoongArch Reference +Manual], or elsewhere on [LoongArch GitHub Account]. + +[LoongArch Reference Manual]: https://github.com/loongson/LoongArch-Documentation +[LoongArch GitHub Account]: https://github.com/loongson + +Feature | Implicitly Enables | Description +------------|---------------------|------------------- +`frecipe` | | FRECIPE --- Reciprocal approximation instrutions +`lasx` | `lsx` | LASX --- 256-bit vector instructions +`lbt` | | LBT --- Binary translation instructions +`lsx` | `d` | LSX --- 128-bit vector instructions +`lvz` | | LVZ --- Virtualization instructions + #### `riscv32` or `riscv64` r[attributes.codegen.target_feature.riscv]