diff options
author | Damien George <damien.p.george@gmail.com> | 2016-07-11 14:27:47 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-07-11 14:27:47 +0100 |
commit | 3593d8e10c960fdc9349589deec3a2d8e4658cf3 (patch) | |
tree | 868e4a88ec5b42aaa45eaa5676daa60a947c6391 /py | |
parent | e9f3fb76620fd2f9a392f2e879431843c27024cc (diff) | |
download | micropython-3593d8e10c960fdc9349589deec3a2d8e4658cf3.tar.gz micropython-3593d8e10c960fdc9349589deec3a2d8e4658cf3.zip |
py/nlrx64.S: Prefix mp_thread_get_state with an underscore on Mac.
Diffstat (limited to 'py')
-rw-r--r-- | py/nlrx64.S | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/py/nlrx64.S b/py/nlrx64.S index ad2b66fdb2..caea35de2b 100644 --- a/py/nlrx64.S +++ b/py/nlrx64.S @@ -37,8 +37,10 @@ #if defined(__APPLE__) && defined(__MACH__) #define NLR_TOP (_mp_state_ctx + NLR_TOP_OFFSET) +#define MP_THREAD_GET_STATE _mp_thread_get_state #else #define NLR_TOP (mp_state_ctx + NLR_TOP_OFFSET) +#define MP_THREAD_GET_STATE mp_thread_get_state #endif // offset of nlr_top within mp_state_thread_t structure @@ -87,7 +89,7 @@ _nlr_push: movq %rdi, NLR_TOP(%rip) # stor new nlr_buf (to make linked list) #else movq %rdi, %rbp # since we make a call, must save rdi in rbp - callq mp_thread_get_state # get mp_state_thread ptr into rax + callq MP_THREAD_GET_STATE # get mp_state_thread ptr into rax movq NLR_TOP_TH_OFF(%rax), %rsi # get thread.nlr_top (last nlr_buf) movq %rsi, (%rbp) # store it movq %rbp, NLR_TOP_TH_OFF(%rax) # store new nlr_buf (to make linked list) @@ -117,7 +119,7 @@ _nlr_pop: movq (%rax), %rax # load prev nlr_buf movq %rax, NLR_TOP(%rip) # store prev nlr_buf (to unlink list) #else - callq mp_thread_get_state # get mp_state_thread ptr into rax + callq MP_THREAD_GET_STATE # get mp_state_thread ptr into rax movq NLR_TOP_TH_OFF(%rax), %rdi # get thread.nlr_top (last nlr_buf) movq (%rdi), %rdi # load prev nlr_buf movq %rdi, NLR_TOP_TH_OFF(%rax) # store prev nlr_buf (to unlink list) @@ -150,7 +152,7 @@ nlr_jump: movq %rax, NLR_TOP(%rip) # store prev nlr_buf (to unlink list) #else movq %rdi, %rbp # put return value in rbp - callq mp_thread_get_state # get thread ptr in rax + callq MP_THREAD_GET_STATE # get thread ptr in rax movq %rax, %rsi # put thread ptr in rsi movq %rbp, %rax # put return value to rax (for je .fail) movq NLR_TOP_TH_OFF(%rsi), %rdi # get thread.nlr_top in rdi |