aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/hipe/hipe_sparc_bifs.m4
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2011-03-18 18:19:45 +0100
committerSverker Eriksson <[email protected]>2011-10-26 18:22:42 +0200
commit01c734e6a60bb9579c00079f7d81d197b684c9e3 (patch)
treeafc4d3879b54dbedbe3e94453af9135cd399c3d2 /erts/emulator/hipe/hipe_sparc_bifs.m4
parent7085a1a3240e80b9558d722e2979c9122e0b29d2 (diff)
downloadotp-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_sparc_bifs.m4')
-rw-r--r--erts/emulator/hipe/hipe_sparc_bifs.m421
1 files changed, 14 insertions, 7 deletions
diff --git a/erts/emulator/hipe/hipe_sparc_bifs.m4 b/erts/emulator/hipe/hipe_sparc_bifs.m4
index 39ca71f1e8..ca5af45d58 100644
--- a/erts/emulator/hipe/hipe_sparc_bifs.m4
+++ b/erts/emulator/hipe/hipe_sparc_bifs.m4
@@ -20,11 +20,18 @@ changecom(`/*', `*/')dnl
include(`hipe/hipe_sparc_asm.m4')
+#`include' "config.h"
#`include' "hipe_literals.h"
.section ".text"
.align 4
+`#if defined(ERTS_ENABLE_LOCK_CHECK) && defined(ERTS_SMP)
+# define CALL_BIF(F) set F, %o7; st %o7, [%o0+P_BIF_CALLEE]; call hipe_debug_bif_wrapper
+#else
+# define CALL_BIF(F) call F
+#endif'
+
/*
* Test for exception. This macro executes its delay slot.
*/
@@ -65,7 +72,7 @@ $1:
SAVE_CONTEXT_BIF
st %o1, [%o0+P_ARG0] ! Store BIF__ARGS in def_arg_reg
add %o0, P_ARG0, %o1
- call $2
+ CALL_BIF($2)
nop
TEST_GOT_MBUF
@@ -94,7 +101,7 @@ $1:
st %o1, [%o0+P_ARG0] ! Store BIF__ARGS in def_arg_reg
st %o2, [%o0+P_ARG1]
add %o0, P_ARG0, %o1
- call $2
+ CALL_BIF($2)
nop
TEST_GOT_MBUF
@@ -125,7 +132,7 @@ $1:
st %o2, [%o0+P_ARG1]
st %o3, [%o0+P_ARG2]
add %o0, P_ARG0, %o1
- call $2
+ CALL_BIF($2)
nop
TEST_GOT_MBUF
@@ -150,7 +157,7 @@ $1:
/* Save caller-save registers and call the C function. */
SAVE_CONTEXT_BIF
/* ignore empty BIF__ARGS */
- call $2
+ CALL_BIF($2)
nop
TEST_GOT_MBUF
@@ -184,7 +191,7 @@ $1:
/* Save caller-save registers and call the C function. */
SAVE_CONTEXT_GC
/* ignore empty BIF__ARGS */
- call $2
+ CALL_BIF($2)
nop
TEST_GOT_MBUF
@@ -210,7 +217,7 @@ $1:
SAVE_CONTEXT_GC
st %o1, [%o0+P_ARG0] ! Store BIF__ARGS in def_arg_reg
add %o0, P_ARG0, %o1
- call $2
+ CALL_BIF($2)
nop
TEST_GOT_MBUF
@@ -239,7 +246,7 @@ $1:
st %o1, [%o0+P_ARG0] ! Store BIF__ARGS in def_arg_reg
st %o2, [%o0+P_ARG1]
add %o0, P_ARG0, %o1
- call $2
+ CALL_BIF($2)
nop
TEST_GOT_MBUF