aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/hipe/hipe_bif2.c
diff options
context:
space:
mode:
authorYiannis Tsiouris <[email protected]>2014-01-28 18:05:31 +0200
committerYiannis Tsiouris <[email protected]>2014-03-07 18:35:02 +0200
commita307b90ba474d2700289cd010d606b8c133fbacb (patch)
treedba9c65b676cbe61f0f29b804cbd22886405f950 /erts/emulator/hipe/hipe_bif2.c
parentf0d4ac85952e847ec3d846b2ab6bd8a508244521 (diff)
downloadotp-a307b90ba474d2700289cd010d606b8c133fbacb.tar.gz
otp-a307b90ba474d2700289cd010d606b8c133fbacb.tar.bz2
otp-a307b90ba474d2700289cd010d606b8c133fbacb.zip
Add a BIF that only returns the atom ok
A call in llvm_fix_pinned_regs/0 is inserted in the beginning of LLVM unwind blocks (i.e. code executed when an LLVM 'invoke' call triggers an exception) in order to get the BP and SP registers right. This is needed because LLVM exception handling doesn't provide the return value (that also contains the values for these registers, as defined in the HiPE Calling Convention for LLVM) on the 'landingpad's.
Diffstat (limited to 'erts/emulator/hipe/hipe_bif2.c')
-rw-r--r--erts/emulator/hipe/hipe_bif2.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/erts/emulator/hipe/hipe_bif2.c b/erts/emulator/hipe/hipe_bif2.c
index 7637049bc3..054911e822 100644
--- a/erts/emulator/hipe/hipe_bif2.c
+++ b/erts/emulator/hipe/hipe_bif2.c
@@ -182,3 +182,10 @@ BIF_RETTYPE hipe_bifs_debug_native_called_2(BIF_ALIST_2)
BIF_RET(am_ok);
}
+/* Stub-BIF for LLVM:
+ * Reloads BP, SP (in llvm unwind label) */
+
+BIF_RETTYPE hipe_bifs_llvm_fix_pinned_regs_0(BIF_ALIST_0)
+{
+ BIF_RET(am_ok);
+}