Skip to content

Commit

Permalink
Fix inline assemble in catch.hpp dependency for ARM Macs (#3118)
Browse files Browse the repository at this point in the history
* * Fix inline assemble in catch.hpp dependency for ARM Macs

See original change in catchorg/Catch2#1127
  • Loading branch information
keenon authored and aymanhab committed Jan 17, 2022
1 parent 949e0e4 commit 041ace9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion OpenSim/Auxiliary/catch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7910,7 +7910,11 @@ namespace Catch {

#ifdef CATCH_PLATFORM_MAC

#define CATCH_TRAP() __asm__("int $3\n" : : ) /* NOLINT */
#if defined(__i386__) || defined(__x86_64__)
#define CATCH_TRAP() __asm__("int $3\n" : : ) /* NOLINT */
#elif defined(__aarch64__)
#define CATCH_TRAP() __asm__(".inst 0xd4200000")
#endif

#elif defined(CATCH_PLATFORM_IPHONE)

Expand Down
6 changes: 5 additions & 1 deletion Vendors/tropter/external/catch/catch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6011,7 +6011,11 @@ namespace Catch {

#ifdef CATCH_PLATFORM_MAC

#define CATCH_TRAP() __asm__("int $3\n" : : ) /* NOLINT */
#if defined(__i386__) || defined(__x86_64__)
#define CATCH_TRAP() __asm__("int $3\n" : : ) /* NOLINT */
#elif defined(__aarch64__)
#define CATCH_TRAP() __asm__(".inst 0xd4200000")
#endif

#elif defined(CATCH_PLATFORM_LINUX)
// If we can use inline assembler, do it because this allows us to break
Expand Down

0 comments on commit 041ace9

Please sign in to comment.