diff options
author | Anthony Ramine <[email protected]> | 2014-08-16 18:23:25 +0200 |
---|---|---|
committer | Anthony Ramine <[email protected]> | 2014-08-16 18:23:25 +0200 |
commit | 44f2f04cb1b5f024ba6934e6cf350b1ffbcaa3ee (patch) | |
tree | 3e6bf5ff08c1456e83828400f04d5241ff8a0f5b /erts/emulator/hipe/hipe_amd64_bifs.m4 | |
parent | 1b9383a8dbc03473860dfaacc7a02fbc8b1b1185 (diff) | |
download | otp-44f2f04cb1b5f024ba6934e6cf350b1ffbcaa3ee.tar.gz otp-44f2f04cb1b5f024ba6934e6cf350b1ffbcaa3ee.tar.bz2 otp-44f2f04cb1b5f024ba6934e6cf350b1ffbcaa3ee.zip |
Fix HiPE debug lock checking on OS X 64bit
Position-independent code is mandatory on OS X. We use r11 as an intermediate
register to fill BIF_P->hipe.bif_callee. This fixes the following error when
doing `make debug FLAVOR=smp`:
clang -cc1as: fatal error: error in backend: 32-bit absolute addressing is not supported in 64-bit mode
Diffstat (limited to 'erts/emulator/hipe/hipe_amd64_bifs.m4')
-rw-r--r-- | erts/emulator/hipe/hipe_amd64_bifs.m4 | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/erts/emulator/hipe/hipe_amd64_bifs.m4 b/erts/emulator/hipe/hipe_amd64_bifs.m4 index 0de69a617f..a3219c7586 100644 --- a/erts/emulator/hipe/hipe_amd64_bifs.m4 +++ b/erts/emulator/hipe/hipe_amd64_bifs.m4 @@ -39,7 +39,10 @@ define(HANDLE_GOT_MBUF,` jmp 2b') `#if defined(ERTS_ENABLE_LOCK_CHECK) && defined(ERTS_SMP) -# define CALL_BIF(F) movq $CSYM(F), P_BIF_CALLEE(P); call CSYM(hipe_debug_bif_wrapper) +# define CALL_BIF(F) \ + movq CSYM(F)@GOTPCREL(%rip), %r11; \ + movq %r11, P_BIF_CALLEE(P); \ + call CSYM(hipe_debug_bif_wrapper) #else # define CALL_BIF(F) call CSYM(F) #endif' |