[all-commits] [llvm/llvm-project] 4299c7: AArch64: add __builtin_arm_trap

Tim Northover via All-commits all-commits at lists.llvm.org
Thu Mar 14 04:33:07 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4299c727e4806aa55398ad23da48a401554cd432
      https://github.com/llvm/llvm-project/commit/4299c727e4806aa55398ad23da48a401554cd432
  Author: Tim Northover <tnorthover at apple.com>
  Date:   2024-03-14 (Thu, 14 Mar 2024)

  Changed paths:
    M clang/docs/LanguageExtensions.rst
    M clang/include/clang/Basic/BuiltinsAArch64.def
    M clang/lib/CodeGen/CGBuiltin.cpp
    M clang/test/CodeGen/builtins-arm64.c
    M clang/test/Sema/builtins-arm64.c

  Log Message:
  -----------
  AArch64: add __builtin_arm_trap

It's useful to provide an indicator code with the trap, which the generic
__builtin_trap can't do. asm("brk #N") is an option, but following that with a
__builtin_unreachable() leads to two traps when the compiler doesn't know the
block can't return. So compiler support like this is useful.



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