Skip to content

Commit a4821a3

Browse files
authored
Merge pull request #67 from kito-cheng/riscv_vector_cc
Function attribute for standard vector calling convention variant: riscv_vector_cc
2 parents a8913c1 + cf54e25 commit a4821a3

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

riscv-c-api.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,19 @@ __attribute__((target("arch=+v"))) int foo(void) { return 0; }
305305
__attribute__((target("arch=+zbb"))) int foo(void) { return 1; }
306306
```
307307
308+
### riscv_vector_cc
309+
310+
Supported Syntaxes:
311+
| Style | Syntax |
312+
| ------ | ----------------------------------- |
313+
| GNU | `__attribute__((riscv_vector_cc)))` |
314+
| C++11 | `[[riscv::vector_cc]]` |
315+
| C23 | `[[riscv::vector_cc]]` |
316+
317+
Functions declared with this attribute will use to the standard vector calling
318+
convention variant as defined in the RISC-V psABI, even if the function has
319+
vector arguments or a return value.
320+
308321
## Intrinsic Functions
309322
310323
Intrinsic functions (or intrinsics or built-ins) are expanded into instruction sequences by compilers.

0 commit comments

Comments
 (0)