diff options
author | Sverker Eriksson <sverker@erlang.org> | 2011-10-25 10:57:12 +0200 |
---|---|---|
committer | Sverker Eriksson <sverker@erlang.org> | 2011-10-26 18:18:44 +0200 |
commit | 36573dcb143db17d9e40b0bd270f2001a9872b63 (patch) | |
tree | 868f01a63a72567e0369919ecd8d229f733414f0 /erts/emulator/hipe/hipe_arm_bifs.m4 | |
parent | 9dbccbfa2759e2232cba8b3ffb7c5c44d564ec69 (diff) | |
download | otp-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_arm_bifs.m4')
-rw-r--r-- | erts/emulator/hipe/hipe_arm_bifs.m4 | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/erts/emulator/hipe/hipe_arm_bifs.m4 b/erts/emulator/hipe/hipe_arm_bifs.m4 index f20739ec52..560e6f46d0 100644 --- a/erts/emulator/hipe/hipe_arm_bifs.m4 +++ b/erts/emulator/hipe/hipe_arm_bifs.m4 @@ -49,6 +49,8 @@ $1: /* Save caller-save registers and call the C function. */ SAVE_CONTEXT_BIF + str r1, [r0, #P_ARG0] /* Store BIF__ARGS in def_arg_reg[] */ + add r1, r0, #P_ARG0 bl $2 TEST_GOT_MBUF(1) @@ -74,6 +76,9 @@ $1: /* Save caller-save registers and call the C function. */ SAVE_CONTEXT_BIF + str r1, [r0, #P_ARG0] /* Store BIF__ARGS in def_arg_reg[] */ + str r2, [r0, #P_ARG1] + add r1, r0, #P_ARG0 bl $2 TEST_GOT_MBUF(2) @@ -100,6 +105,10 @@ $1: /* Save caller-save registers and call the C function. */ SAVE_CONTEXT_BIF + str r1, [r0, #P_ARG0] /* Store BIF__ARGS in def_arg_reg[] */ + str r2, [r0, #P_ARG1] + str r3, [r0, #P_ARG2] + add r1, r0, #P_ARG0 bl $2 TEST_GOT_MBUF(3) @@ -129,6 +138,7 @@ $1: /* Save caller-save registers and call the C function. */ SAVE_CONTEXT_BIF + /* ignore empty BIF__ARGS */ bl $2 TEST_GOT_MBUF(0) |