[PATCH] D134365: [LoongArch] Add support for llvm.trap and llvm.debugtrap

Xi Ruoyao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 21 09:04:54 PDT 2022


xry111 added a comment.

I have some doubt here: on x86_64 a `trap` leads to SIGTRAP, but a `debugtrap` leads to SIGILL.  Not sure if they have a good reason or this is just for satisfying some "habit" of x86 programmers.

If we want a SIGILL we can `amswap.w $r0, $r0, $r0`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134365/new/

https://reviews.llvm.org/D134365



More information about the llvm-commits mailing list