aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/hipe/hipe_x86_bifs.m4
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2011-10-25 10:57:12 +0200
committerSverker Eriksson <[email protected]>2011-10-26 18:18:44 +0200
commit36573dcb143db17d9e40b0bd270f2001a9872b63 (patch)
tree868f01a63a72567e0369919ecd8d229f733414f0 /erts/emulator/hipe/hipe_x86_bifs.m4
parent9dbccbfa2759e2232cba8b3ffb7c5c44d564ec69 (diff)
downloadotp-36573dcb143db17d9e40b0bd270f2001a9872b63.tar.gz
otp-36573dcb143db17d9e40b0bd270f2001a9872b63.tar.bz2
otp-36573dcb143db17d9e40b0bd270f2001a9872b63.zip
erts-hipe: Adapt generated BIF wrappers for new calling convention
x86 and amd64: Push BIF__ARGS array on C-stack. ppc, sparc and arm: Write BIF__ARGS array to P->def_arg_reg[] Just the simplest solution with limited assembler knowledge, probably room for improvements.
Diffstat (limited to 'erts/emulator/hipe/hipe_x86_bifs.m4')
-rw-r--r--erts/emulator/hipe/hipe_x86_bifs.m419
1 files changed, 13 insertions, 6 deletions
diff --git a/erts/emulator/hipe/hipe_x86_bifs.m4 b/erts/emulator/hipe/hipe_x86_bifs.m4
index 649c556fae..12f22fbc10 100644
--- a/erts/emulator/hipe/hipe_x86_bifs.m4
+++ b/erts/emulator/hipe/hipe_x86_bifs.m4
@@ -60,7 +60,9 @@ ASYM($1):
/* make the call on the C stack */
NBIF_ARG_REG(0,P)
- NBIF_ARG(1,1,0)
+ NBIF_ARG(2,1,0)
+ lea 8(%esp), %eax
+ NBIF_ARG_REG(1,%eax) # BIF__ARGS
call CSYM($2)
TEST_GOT_MBUF
@@ -92,8 +94,10 @@ ASYM($1):
/* make the call on the C stack */
NBIF_ARG_REG(0,P)
- NBIF_ARG(1,2,0)
- NBIF_ARG(2,2,1)
+ NBIF_ARG(2,2,0)
+ NBIF_ARG(3,2,1)
+ lea 8(%esp), %eax
+ NBIF_ARG_REG(1,%eax) # BIF__ARGS
call CSYM($2)
TEST_GOT_MBUF
@@ -125,9 +129,11 @@ ASYM($1):
/* make the call on the C stack */
NBIF_ARG_REG(0,P)
- NBIF_ARG(1,3,0)
- NBIF_ARG(2,3,1)
- NBIF_ARG(3,3,2)
+ NBIF_ARG(2,3,0)
+ NBIF_ARG(3,3,1)
+ NBIF_ARG(4,3,2)
+ lea 8(%esp), %eax
+ NBIF_ARG_REG(1,%eax) # BIF__ARGS
call CSYM($2)
TEST_GOT_MBUF
@@ -162,6 +168,7 @@ ASYM($1):
/* make the call on the C stack */
NBIF_ARG_REG(0,P)
+ /* skip BIF__ARGS */
call CSYM($2)
TEST_GOT_MBUF