diff options
author | Sverker Eriksson <[email protected]> | 2011-11-09 21:07:55 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2011-11-09 21:07:55 +0100 |
commit | a4b82870313b04a51cc2d71f6d5a420b386cec68 (patch) | |
tree | 2368147f9b260058dd49ea5e587b603548f1e2d0 /erts/emulator/hipe/hipe_risc_glue.h | |
parent | d82c450402b4fe030befc28cc77e3bc2c07001c1 (diff) | |
parent | 79e5d78244143e0c891f87e9971c9598c4cdea4c (diff) | |
download | otp-a4b82870313b04a51cc2d71f6d5a420b386cec68.tar.gz otp-a4b82870313b04a51cc2d71f6d5a420b386cec68.tar.bz2 otp-a4b82870313b04a51cc2d71f6d5a420b386cec68.zip |
Merge branch 'sverk/bif-args/OTP-9662'
* sverk/bif-args/OTP-9662:
erts,hipe: Limited support for hipe cross compilation
erts-hipe: Change THE_NON_VALUE for HiPE enabled debug emulator
erts-hipe: Enable debug compiled hipe-VM with lock checker
erts-hipe: Rename fail_bif_interface_0 to standard_bif_interface_0
erts-hipe: Deliberate leak of native fun entries
erts-hipe: Fix new trap conventions for x86, amd64 and ppc
Store the trap address in p->i
Store the trap arguments in the X register array
erts-hipe: Make some primops use new BIF calling convention
erts-hipe: Adapt generated BIF wrappers for new calling convention
erts-hipe: Remove obscuring macros in generated assembler code
erts-hipe: Make hipe enabled emulator compile with new BIF calls
Simplify the instructions for calling BIFs
Change the calling convention for BIFs
Use the proper macros in all BIFs
Conflicts:
erts/emulator/beam/bif.h
erts/emulator/beam/erl_bif_info.c
Diffstat (limited to 'erts/emulator/hipe/hipe_risc_glue.h')
-rw-r--r-- | erts/emulator/hipe/hipe_risc_glue.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/erts/emulator/hipe/hipe_risc_glue.h b/erts/emulator/hipe/hipe_risc_glue.h index e74023e3e9..cc2671c016 100644 --- a/erts/emulator/hipe/hipe_risc_glue.h +++ b/erts/emulator/hipe/hipe_risc_glue.h @@ -199,6 +199,22 @@ hipe_call_from_native_is_recursive(Process *p, Eterm reg[]) return 0; } +/* BEAM called native, which called BIF that returned trap + * Discard bif parameters. + * If tailcall, also clean up native stub continuation. */ +static __inline__ int +hipe_trap_from_native_is_recursive(Process *p) +{ + if (p->hipe.narity > NR_ARG_REGS) { + p->hipe.nsp += (p->hipe.narity - NR_ARG_REGS); + } + if (p->hipe.nra != (void(*)(void))&nbif_return) + return 1; + hipe_pop_risc_nra_frame(p); + return 0; +} + + /* Native makes a call which needs to unload the parameters. This differs from hipe_call_from_native_is_recursive() in that it doesn't check for or pop the BEAM-calls-native frame. |