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

WÁNG Xuěruì via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 26 06:17:02 PDT 2022


xen0n added a comment.

In D134365#3814862 <https://reviews.llvm.org/D134365#3814862>, @xry111 wrote:

> RISC-V uses an undefined instruction for `llvm.trap`.  AArch64 uses different break codes for `trap` and `debugtrap`.
>
> I think we need to either request an instruction "must be undefined", or request a documentation of break codes.  Note that `break 7` is already used for a SIGFPE (when `-mcheck-zero-division`) and the number `7` is not documented anywhere AFAIK...

Look at `/usr/include/asm/break.h` in your LoongArch sysroot for the definitions... inherited from MIPS, of course. Unfortunately there's no reservation about an "abort" kind... maybe I should ask and try to stuff one into Linux before amending the patch to make use of that.


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