Skip to content

Commit

Permalink
Add a preprocessor definitions to indidcate the landing pad labeling …
Browse files Browse the repository at this point in the history
…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
```
  • Loading branch information
kito-cheng committed Sep 23, 2024
1 parent 5ebc2c8 commit 3e51600
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/c-api.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 3e51600

Please sign in to comment.