Update catch_debugger.h

This commit is contained in:
FX Coudert 2021-01-11 12:22:22 +01:00 committed by GitHub
parent 64a533551d
commit bb6d08323f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,6 +27,9 @@ namespace Catch{
#define CATCH_TRAP() \ #define CATCH_TRAP() \
__asm__("li r0, 20\nsc\nnop\nli r0, 37\nli r4, 2\nsc\nnop\n" \ __asm__("li r0, 20\nsc\nnop\nli r0, 37\nli r4, 2\nsc\nnop\n" \
: : : "memory","r0","r3","r4" ) /* NOLINT */ : : : "memory","r0","r3","r4" ) /* NOLINT */
#elif defined(__aarch64__)
// Backport of https://github.com/catchorg/Catch2/commit/a25c1a24af8bffd35727a888a307ff0280cf9387
#define CATCH_TRAP() __asm__(".inst 0xd4200000")
#else #else
#define CATCH_TRAP() __asm__("int $3\n" : : /* NOLINT */ ) #define CATCH_TRAP() __asm__("int $3\n" : : /* NOLINT */ )
#endif #endif