Skip to content

Commit 779beee

Browse files
committed
Add a preprocessor definitions to indidcate the landing pad labeling scheme
Also add 2 more constant value to let user able to determine the scheme. Example code: ```c #ifdef __riscv_landing_pad #if __riscv_landing_pad == __riscv_landing_pad_simple ... #elif __riscv_landing_pad == __riscv_landing_pad_func_sig ... #else #error "Unknown labeling scheme" #endif #endif ```
1 parent d4ebd38 commit 779beee

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

riscv-c-api.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ https://creativecommons.org/licenses/by/4.0/.
4747
| __riscv_misaligned_fast | 1 | Misaligned accesses are fast. |
4848
| __riscv_misaligned_slow | 1 | Misaligned accesses are supported, but may be substantially slower than aligned accesses. |
4949
| __riscv_misaligned_avoid | 1 | Misaligned accesses are not supported and could trap. (see [ __riscv_misaligned_{fast,slow,avoid}](#__riscv_misaligned_{fast,slow,avoid}) |
50+
| __riscv_landing_pad | <N> (See [__riscv_landing_pad](#__riscv_landing_pad) | Defined if the landing pad is enabled, and specifies which labeling scheme is used. |
51+
| __riscv_landing_pad_simple | 1 | Constant value for the simple labeling scheme. |
52+
| __riscv_landing_pad_func_sig | 2 | Constant value for the function signature based labeling scheme. |
5053

5154
### __riscv_v_min_vlen
5255

@@ -107,6 +110,10 @@ and avoid to -mstrict-align, if specified.
107110
Perhaps obvious, but these are mutually exclusive, so only one is defined at a time
108111
for a compilation unit.
109112

113+
### __riscv_landing_pad
114+
115+
The value of `__riscv_landing_pad` indicates which labeling scheme is used. It
116+
can be either `__riscv_landing_pad_simple` or `__riscv_landing_pad_func_sig`.
110117

111118
### Architecture Extension Test Macros
112119

0 commit comments

Comments
 (0)