[all-commits] [llvm/llvm-project] c28d6c: [Clang][RISCV] Add Zicfilp CFI unlabeled scheme pr...

Ming-Yi Lai via All-commits all-commits at lists.llvm.org
Mon May 19 03:39:52 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c28d6c2f5fefa13e7c7efd245ace2698e47a494c
      https://github.com/llvm/llvm-project/commit/c28d6c2f5fefa13e7c7efd245ace2698e47a494c
  Author: Ming-Yi Lai <ming-yi.lai at mediatek.com>
  Date:   2025-05-19 (Mon, 19 May 2025)

  Changed paths:
    M clang/lib/Basic/Targets/RISCV.cpp
    A clang/test/Preprocessor/riscv-cf-protection-branch.c

  Log Message:
  -----------
  [Clang][RISCV] Add Zicfilp CFI unlabeled scheme preprocessor macros (#109600)

This patch adds preprocessor macros when Zicfilp CFI is enabled. To be
specific:

+ `#define __riscv_landing_pad 1` when `-fcf-protection=[full|branch]`
+ `#define __riscv_landing_pad_unlabeled 1` when
`-fcf-protection=[full|branch] -mcf-branch-label-scheme=unlabeled`

The macros are proposed in riscv-non-isa/riscv-c-api-doc#76 , and the
CLI flags are from riscv-non-isa/riscv-toolchain-conventions#54.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list