From 21aac32474ff6830fd16ee4e74938210eae0ca0f Mon Sep 17 00:00:00 2001 From: Kito Cheng Date: Fri, 10 May 2024 16:28:04 +0800 Subject: [PATCH] Add a preprocessor definitions to indidcate the landing pad labeling scheme Also add 2 more macros to let user able to determine the scheme. Example code: ```c #ifdef __riscv_landing_pad #if defined(__riscv_landing_pad_unlabeled) ... #elif defined(__riscv_landing_pad_func_sig) ... #else #error "Unknown labeling scheme" #endif #endif ``` --- src/c-api.adoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/c-api.adoc b/src/c-api.adoc index 44333c0..81be981 100644 --- a/src/c-api.adoc +++ b/src/c-api.adoc @@ -29,6 +29,9 @@ a| |`+__riscv_misaligned_fast+` |1 | Scalar misaligned accesses are fast. |`+__riscv_misaligned_slow+` |1 | Scalar misaligned accesses are supported, but may be substantially slower than aligned accesses. |`+__riscv_misaligned_avoid+` |1 | Scalar misaligned accesses are not supported and could trap. (see <<__riscv_misaligned_fast_slow_avoid, `+__riscv_misaligned_{fast,slow,avoid}+`>>) +| `+__riscv_landing_pad+` | 1 | Defined if the landing pad is enabled. | +| `+__riscv_landing_pad_unlabeled+` | 1 | Defined if the unlabeled labeling scheme is enabled. | +| `+__riscv_landing_pad_func_sig+` | 1 | Defined if the function signature based labeling scheme is enabled. | |=== [id=__riscv_v_min_vlen]