diff options
author | Sverker Eriksson <[email protected]> | 2011-10-25 10:57:12 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2011-10-26 18:18:44 +0200 |
commit | 36573dcb143db17d9e40b0bd270f2001a9872b63 (patch) | |
tree | 868f01a63a72567e0369919ecd8d229f733414f0 /erts/emulator/hipe/hipe_amd64_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_amd64_bifs.m4')
-rw-r--r-- | erts/emulator/hipe/hipe_amd64_bifs.m4 | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/erts/emulator/hipe/hipe_amd64_bifs.m4 b/erts/emulator/hipe/hipe_amd64_bifs.m4 index 4d53947998..8b326968c9 100644 --- a/erts/emulator/hipe/hipe_amd64_bifs.m4 +++ b/erts/emulator/hipe/hipe_amd64_bifs.m4 @@ -58,7 +58,11 @@ ASYM($1): /* make the call on the C stack */ SWITCH_ERLANG_TO_C + pushq %rsi + movq %rsp, %rsi /* Eterm* BIF__ARGS */ + sub $(8), %rsp /* stack frame 16-byte alignment */ call CSYM($2) + add $(1*8 + 8), %rsp TEST_GOT_MBUF SWITCH_C_TO_ERLANG @@ -86,7 +90,11 @@ ASYM($1): /* make the call on the C stack */ SWITCH_ERLANG_TO_C + pushq %rdx + pushq %rsi + movq %rsp, %rsi /* Eterm* BIF__ARGS */ call CSYM($2) + add $(2*8), %rsp TEST_GOT_MBUF SWITCH_C_TO_ERLANG @@ -115,7 +123,13 @@ ASYM($1): /* make the call on the C stack */ SWITCH_ERLANG_TO_C + pushq %rcx + pushq %rdx + pushq %rsi + movq %rsp, %rsi /* Eterm* BIF__ARGS */ + sub $(8), %rsp /* stack frame 16-byte alignment */ call CSYM($2) + add $(3*8 + 8), %rsp TEST_GOT_MBUF SWITCH_C_TO_ERLANG |