@@ -145,6 +145,7 @@ For example:
145
145
| __ riscv_zbc | Arch Version | ` Zbc ` extension is available. |
146
146
| __ riscv_zbs | Arch Version | ` Zbs ` extension is available. |
147
147
| __ riscv_zfh | Arch Version | ` Zfh ` extension is available. |
148
+ | __ riscv_zimop | Arch Version | ` Zimop ` extension is available. |
148
149
149
150
### ABI Related Preprocessor Definitions
150
151
@@ -520,6 +521,26 @@ Sign extension of 32-bit values on RV64 is not reflected in the interface.
520
521
| `uint32_t __riscv_sm4ed(uint32_t rs1, uint32_t rs2, const int bs);` | `sm4ed` | Zksed | `bs`=[0..3] |
521
522
| `uint32_t __riscv_sm4ks(uint32_t rs1, uint32_t rs2, const int bs);` | `sm4ks` | Zksed | `bs`=[0..3] |
522
523
524
+ ### May-Be-Operations Extension Intrinsics
525
+
526
+ The functions are only available if the compiler's `-march` string
527
+ enables the required ISA extension. (Calling functions for not enabled
528
+ ISA extensions will lead to compile-time and/or link-time errors.)
529
+
530
+ Intrinsics operating on XLEN sized value are not available as there is no type
531
+ defined. If `xlen_t` is added in the future, this can be revisited.
532
+
533
+ Unsigned types are used as that is the most logical representation for a
534
+ collection of bits.
535
+
536
+ Sign extension of 32-bit values on RV64 is not reflected in the interface.
537
+
538
+ | Prototype | Instruction | Extension | Notes |
539
+ |-------------------------------------------------------------------------|---------------|--------------|---------------------------------------------------------------|
540
+ | `uint32_t __riscv_mopr_32(uint32_t rs1, const int n);` | `mop.r.[n]` | Zimop | Emulated with `mopr.r.[n]`+`sext.w` on RV64 <br/> `n`=[0..31] |
541
+ | `uint64_t __riscv_mopr_64(uint64_t rs1, const int n);` | `mop.r.[n]` | Zimop (RV64) | `n`=[0..31] |
542
+ | `uint32_t __riscv_moprr_32(uint32_t rs1, uint32_t rs2, const int n);` | `mop.rr.[n]` | Zimop | Emulated with `mopr.rr.[n]`+`sext.w` on RV64 <br/> `n`=[0..7] |
543
+ | `uint64_t __riscv_moprr_64(uint64_t rs1, uint64_t rs2, const int n);` | `mop.rr.[n]` | Zimop (RV64) | `n`=[0..7] |
523
544
524
545
## Constraints on Operands of Inline Assembly Statements
525
546
0 commit comments