diff options
author | Bob Abeles <phil99boyd@gmail.com> | 2021-05-14 08:05:40 -0700 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2021-05-18 11:52:00 +1000 |
commit | 7ceccad4e2f1e9d073f5781c32e5b377e8391a25 (patch) | |
tree | 65d2dbf562ca52cfcb948e3b8568ceb777c905c2 /py/nlrx64.c | |
parent | 126b1c727118352923703719a2a3d45b9fad3c97 (diff) |
py/nlrx64: Correct the detection of Darwin ABI.
__APPLE__ tests for an Apple OS and __MACH__ tests that it is based on CMU
Mach. Using both tests ensures that just Darwin is recognized.
Diffstat (limited to 'py/nlrx64.c')
-rw-r--r-- | py/nlrx64.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/py/nlrx64.c b/py/nlrx64.c index f5d02afbd..6f006e755 100644 --- a/py/nlrx64.c +++ b/py/nlrx64.c @@ -58,7 +58,7 @@ unsigned int nlr_push(nlr_buf_t *nlr) { #else __asm volatile ( - #if defined(__APPLE__) || defined(__MACH__) + #if defined(__APPLE__) && defined(__MACH__) "pop %rbp \n" // undo function's prelude #endif "movq (%rsp), %rax \n" // load return %rip @@ -70,7 +70,7 @@ unsigned int nlr_push(nlr_buf_t *nlr) { "movq %r13, 56(%rdi) \n" // store %r13 into nlr_buf "movq %r14, 64(%rdi) \n" // store %r14 into nlr_buf "movq %r15, 72(%rdi) \n" // store %r15 into nlr_buf - #if defined(__APPLE__) || defined(__MACH__) + #if defined(__APPLE__) && defined(__MACH__) "jmp _nlr_push_tail \n" // do the rest in C #else "jmp nlr_push_tail \n" // do the rest in C |