Skip to content

Commit 6fa1d14

Browse files
committed
Add CMO extension intrinsics
1 parent e1aa759 commit 6fa1d14

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/c-api.adoc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,29 @@ RISC-V intrinsics examples:
485485
vint8m1_t __riscv_vadd_vv_i8m1(vint8m1_t vs2, vint8m1_t vs1, size_t vl); // vadd.vv vd, vs2, vs1
486486
----
487487

488+
=== CMO Intrinsics
489+
490+
The RISC-V CMO extension provides instruction for perform operations on copies
491+
of data in the memory hierarchy.
492+
493+
In order to access the RISC-V CMO intrinsics, it is necessary to
494+
include the header file `riscv_cmo.h`.
495+
496+
The functions are only available if the compiler's `-march` string enables the
497+
required ISA extension.
498+
499+
.CMO Extension Intrinsics
500+
[%autowidth]
501+
|===
502+
|*Prototype* |*Instruction* |*Extension*
503+
|`+void __riscv_cbo_clean(void *addr);+` |`cbo.clean` |Zicbom
504+
|`+void __riscv_cbo_flush(void *addr);+` |`cbo.flush` |Zicbom
505+
|`+void __riscv_cbo_inval(void *addr);+` |`cbo.inval` |Zicbom
506+
|`+void __riscv_cbo_zero(void *addr);+` |`cbo.zero` |Zicboz
507+
|`+void __riscv_cbo_prefetch(void *addr, const int rw, const int locality);+` |`prefetch.[r][w]` |Zicbop
508+
|`+int __riscv_cbo_prefetchi(const int locality);+` |`prefetch.i` |Zicbop
509+
|===
510+
488511
=== NTLH Intrinsics
489512

490513

0 commit comments

Comments
 (0)