[PATCH] D63617: [COFF, ARM64] Fix encoding of __debugbreak

Tom Tan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 20 13:38:59 PDT 2019


TomTan added a comment.

In D63617#1552561 <https://reviews.llvm.org/D63617#1552561>, @rnk wrote:

> I think it would be preferable to make `llvm.debugtrap` emit `brk #0xF000` on aarch64-windows-*, so other frontends (Rust etc) get the right behavior by default. Right now, AArch64 doesn't do anything special for DEBUGTRAP, so we get the default behavior of `llvm.trap`.
>
> Is this `BRK #0xF000` convention universal to all OSs, or is it a specific convention for Windows debuggers?


I looked at `llvm.debugtrap` but I am not sure the side-effect of that fix, like could there be some other ABI (mingw, etc.) on Windows ARM64 which expects DEBUGTRAP to be the same as `Android/Linux`.

I think this `BRK #0xF000` convention is only for Windows debugger and exception handler, such as we define `__fastfail` in the same way with different operand, not universal for all OSs.


Repository:
  rC Clang

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

https://reviews.llvm.org/D63617





More information about the cfe-commits mailing list