Add a func_addr instruction.

Get the callable address of a function. Use for long distance calls and
for creating arguments to call_indirect in general.
This commit is contained in:
Jakob Stoklund Olesen
2017-09-19 15:54:02 -07:00
parent 0cfea8858a
commit d92686d1cd
8 changed files with 42 additions and 8 deletions

View File

@@ -411,13 +411,7 @@ This simple example illustrates direct function calls and signatures::
Indirect function calls use a signature declared in the preamble.
.. autoinst:: call_indirect
.. todo:: Define safe indirect function calls.
The :inst:`call_indirect` instruction is dangerous to use in a sandboxed
environment since it is not easy to verify the callee address.
We need a table-driven indirect call instruction, similar to
:inst:`br_table`.
.. autoinst:: func_addr
Memory