Skip to content

Commit a53195c

Browse files
committed
Refine proposal
1 parent 716cd92 commit a53195c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

riscv-c-api.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -402,15 +402,15 @@ enum {
402402
403403
### Prefetch Intrinsics
404404
405-
The zicbop extension provide the prefetch instruction to allow users to optimize data access patterns by providing hints to the hardware regarding future data accesses. It is supported through a compiler-defined built-in function with three arguments that specify its behavior.
405+
The Zicbop extension provide the prefetch instruction to allow users to optimize data access patterns by providing hints to the hardware regarding future data accesses. It is supported through a compiler-defined built-in function with three arguments that specify its behavior.
406406
407407
```
408408
void __builtin_prefetch(const void *addr, int rw, int locality)
409409
```
410410
411-
The locality for the built-in __builtin_prefetch function in RISC-V can be achieved using the Non-Temporal Locality Hints (NTLH) extension. According to Non-Temporal Locality Hints extension, it indicates that a cache line should be prefetched into a cache that is outer from the level specified by the NTL when a NTL instruction is applied to prefetch instruction.
411+
The locality for the built-in `__builtin_prefetch` function in RISC-V can be achieved using the Non-Temporal Locality Hints (Zihintntl) extension. According to Non-Temporal Locality Hints extension, it indicates that a cache line should be prefetched into a cache that is outer from the level specified by the NTL when a NTL instruction is applied to prefetch instruction.
412412
413-
The following table presents the mapping from the __builtin_prefetch function to the corresponding assembly instructions using the NTL extension.
413+
The following table presents the mapping from the `__builtin_prefetch` function to the corresponding assembly instructions assuming the presence of the Zihintntl and Zicbop extensions.
414414
415415
| Prefetch function | Assembly |
416416
| ----------------------------------------------- | ---------------------------- |
@@ -419,8 +419,6 @@ The following table presents the mapping from the __builtin_prefetch function to
419419
| `__builtin_prefetch(ptr, 0, 2 /* locality */);` | `ntl.p1 + prefetch.r (ptr)` |
420420
| `__builtin_prefetch(ptr, 0, 3 /* locality */);` | `prefetch.r (ptr)` |
421421
422-
Compiler only emits the ntlh hints if the Zihintntl extension is enabled.
423-
424422
### Scalar Bit Manipulation Extension Intrinsics
425423
426424
In order to access the RISC-V scalar bit manipulation intrinsics, it is

0 commit comments

Comments
 (0)