diff options
author | Sverker Eriksson <[email protected]> | 2011-03-18 18:19:45 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2011-10-26 18:22:42 +0200 |
commit | 01c734e6a60bb9579c00079f7d81d197b684c9e3 (patch) | |
tree | afc4d3879b54dbedbe3e94453af9135cd399c3d2 /erts/emulator/hipe/hipe_ppc_bifs.m4 | |
parent | 7085a1a3240e80b9558d722e2979c9122e0b29d2 (diff) | |
download | otp-01c734e6a60bb9579c00079f7d81d197b684c9e3.tar.gz otp-01c734e6a60bb9579c00079f7d81d197b684c9e3.tar.bz2 otp-01c734e6a60bb9579c00079f7d81d197b684c9e3.zip |
erts-hipe: Enable debug compiled hipe-VM with lock checker
Add hipe_debug_bif_wrapper() as a wrapper for every BIF
called by native code.
Diffstat (limited to 'erts/emulator/hipe/hipe_ppc_bifs.m4')
-rw-r--r-- | erts/emulator/hipe/hipe_ppc_bifs.m4 | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/erts/emulator/hipe/hipe_ppc_bifs.m4 b/erts/emulator/hipe/hipe_ppc_bifs.m4 index 2dfbc48835..d09551d10d 100644 --- a/erts/emulator/hipe/hipe_ppc_bifs.m4 +++ b/erts/emulator/hipe/hipe_ppc_bifs.m4 @@ -20,8 +20,15 @@ changecom(`/*', `*/')dnl include(`hipe/hipe_ppc_asm.m4') +#`include' "config.h" #`include' "hipe_literals.h" +`#if defined(ERTS_ENABLE_LOCK_CHECK) && defined(ERTS_SMP) +# define CALL_BIF(F) STORE_IA(CSYM(F), P_BIF_CALLEE(P), r29); bl CSYM(hipe_debug_bif_wrapper) +#else +# define CALL_BIF(F) bl CSYM(F) +#endif' + .text .p2align 2 @@ -57,7 +64,7 @@ ASYM($1): SAVE_CONTEXT_BIF STORE r4, P_ARG0(r3) # Store BIF__ARGS in def_arg_reg[] addi r4, r3, P_ARG0 - bl CSYM($2) + CALL_BIF($2) TEST_GOT_MBUF /* Restore registers. Check for exception. */ @@ -88,7 +95,7 @@ ASYM($1): STORE r4, P_ARG0(r3) # Store BIF__ARGS in def_arg_reg[] STORE r5, P_ARG1(r3) addi r4, r3, P_ARG0 - bl CSYM($2) + CALL_BIF($2) TEST_GOT_MBUF /* Restore registers. Check for exception. */ @@ -121,7 +128,7 @@ ASYM($1): STORE r5, P_ARG1(r3) STORE r6, P_ARG2(r3) addi r4, r3, P_ARG0 - bl CSYM($2) + CALL_BIF($2) TEST_GOT_MBUF /* Restore registers. Check for exception. */ @@ -148,7 +155,7 @@ ASYM($1): /* Save caller-save registers and call the C function. */ SAVE_CONTEXT_BIF /* ignore empty BIF__ARGS */ - bl CSYM($2) + CALL_BIF($2) TEST_GOT_MBUF /* Restore registers. Check for exception. */ @@ -184,7 +191,7 @@ ASYM($1): /* Save caller-save registers and call the C function. */ SAVE_CONTEXT_GC /* ignore empty BIF__ARGS */ - bl CSYM($2) + CALL_BIF($2) TEST_GOT_MBUF /* Restore registers. */ @@ -209,7 +216,7 @@ ASYM($1): SAVE_CONTEXT_GC STORE r4, P_ARG0(r3) # Store BIF__ARGS in def_arg_reg[] addi r4, r3, P_ARG0 - bl CSYM($2) + CALL_BIF($2) TEST_GOT_MBUF /* Restore registers. Check for exception. */ @@ -240,7 +247,7 @@ ASYM($1): STORE r4, P_ARG0(r3) # Store BIF__ARGS in def_arg_reg[] STORE r5, P_ARG1(r3) addi r4, r3, P_ARG0 - bl CSYM($2) + CALL_BIF($2) TEST_GOT_MBUF /* Restore registers. Check for exception. */ |