[all-commits] [llvm/llvm-project] 6e2d67: [RISCV] Support predefined macro __riscv_misaligne...

Yeting Kuo via All-commits all-commits at lists.llvm.org
Thu Oct 26 00:11:10 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6e2d67e7d66f46fbe4f4c35c7c59d3a8706ea8b0
      https://github.com/llvm/llvm-project/commit/6e2d67e7d66f46fbe4f4c35c7c59d3a8706ea8b0
  Author: Yeting Kuo <46629943+yetingk at users.noreply.github.com>
  Date:   2023-10-26 (Thu, 26 Oct 2023)

  Changed paths:
    M clang/lib/Basic/Targets/RISCV.cpp
    M clang/lib/Basic/Targets/RISCV.h
    M clang/test/Preprocessor/riscv-target-features.c

  Log Message:
  -----------
  [RISCV] Support predefined macro __riscv_misaligned_[fast,avoid]. (#65756)

RISC-V C API introduced predefined macro to achieve hints about
unaligned accesses ([pr]). This patch defines __riscv_misaligned_fast
when using -mno-strict-align, otherwise, defines
__riscv_misaligned_avoid.

Note: This ignores __riscv_misaligned_slow which is also defined by
spec.

[pr]: https://github.com/riscv-non-isa/riscv-c-api-doc/pull/40




More information about the All-commits mailing list