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_arm_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_arm_bifs.m4')
-rw-r--r-- | erts/emulator/hipe/hipe_arm_bifs.m4 | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/erts/emulator/hipe/hipe_arm_bifs.m4 b/erts/emulator/hipe/hipe_arm_bifs.m4 index cecc493476..e0c6f09796 100644 --- a/erts/emulator/hipe/hipe_arm_bifs.m4 +++ b/erts/emulator/hipe/hipe_arm_bifs.m4 @@ -20,11 +20,18 @@ changecom(`/*', `*/')dnl include(`hipe/hipe_arm_asm.m4') +#`include' "config.h" #`include' "hipe_literals.h" .text .p2align 2 +`#if defined(ERTS_ENABLE_LOCK_CHECK) && defined(ERTS_SMP) +# define CALL_BIF(F) mov r14, #F; str r14, [r0, #P_BIF_CALLEE]; bl hipe_debug_bif_wrapper +#else +# define CALL_BIF(F) bl F +#endif' + define(TEST_GOT_MBUF,`ldr r1, [P, #P_MBUF] /* `TEST_GOT_MBUF' */ cmp r1, #0 blne nbif_$1_gc_after_bif') @@ -52,7 +59,7 @@ $1: SAVE_CONTEXT_BIF str r1, [r0, #P_ARG0] /* Store BIF__ARGS in def_arg_reg[] */ add r1, r0, #P_ARG0 - bl $2 + CALL_BIF($2) TEST_GOT_MBUF(1) /* Restore registers. Check for exception. */ @@ -80,7 +87,7 @@ $1: str r1, [r0, #P_ARG0] /* Store BIF__ARGS in def_arg_reg[] */ str r2, [r0, #P_ARG1] add r1, r0, #P_ARG0 - bl $2 + CALL_BIF($2) TEST_GOT_MBUF(2) /* Restore registers. Check for exception. */ @@ -110,7 +117,7 @@ $1: str r2, [r0, #P_ARG1] str r3, [r0, #P_ARG2] add r1, r0, #P_ARG0 - bl $2 + CALL_BIF($2) TEST_GOT_MBUF(3) /* Restore registers. Check for exception. */ @@ -134,7 +141,7 @@ $1: /* Save caller-save registers and call the C function. */ SAVE_CONTEXT_BIF /* ignore empty BIF__ARGS */ - bl $2 + CALL_BIF($2) TEST_GOT_MBUF(0) /* Restore registers. Check for exception. */ |