aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/beam_load.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-05-03 20:27:01 +0200
committerSverker Eriksson <[email protected]>2017-05-04 16:18:25 +0200
commite01b87f45486330561d5673fd109a6b6e40828b2 (patch)
treeb5b8d3562b494e1c05ee6c9a634434551a8c8dfa /erts/emulator/beam/beam_load.c
parentffa80a41370025ed2fb95967e731f13cc7e45e4f (diff)
downloadotp-e01b87f45486330561d5673fd109a6b6e40828b2.tar.gz
otp-e01b87f45486330561d5673fd109a6b6e40828b2.tar.bz2
otp-e01b87f45486330561d5673fd109a6b6e40828b2.zip
erts: Move and rename erts_is_native_break()
Diffstat (limited to 'erts/emulator/beam/beam_load.c')
-rw-r--r--erts/emulator/beam/beam_load.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c
index 7b79e6303b..2763d8a38e 100644
--- a/erts/emulator/beam/beam_load.c
+++ b/erts/emulator/beam/beam_load.c
@@ -5696,6 +5696,18 @@ erts_is_module_native(BeamCodeHeader* code_hdr)
return 0;
}
+int
+erts_is_function_native(ErtsCodeInfo *ci)
+{
+#ifdef HIPE
+ ASSERT(ci->op == (BeamInstr) BeamOp(op_i_func_info_IaaI));
+ return erts_codeinfo_to_code(ci)[0] == (BeamInstr) BeamOp(op_hipe_trap_call)
+ || erts_codeinfo_to_code(ci)[0] == (BeamInstr) BeamOp(op_hipe_trap_call_closure);
+#else
+ return 0;
+#endif
+}
+
/*
* Builds a list of all functions including native addresses.
* [{Name,Arity,NativeAddress},...]