diff --git a/BasicCABI.md b/BasicCABI.md index 01c715e..6bae527 100644 --- a/BasicCABI.md +++ b/BasicCABI.md @@ -96,6 +96,15 @@ Bitfield type | Witdh *w* | Range `signed long long` | 1 to 64 | -2(w-1) to 2(w-1)-1 `long long`, `unsigned long long` | 1 to 64 | 0 to 2w-1 +**Function pointers** + +A pointer to a function is an index into a table of the module. +The type of the table is funcref. +The table needs to be exported with the name `__indirect_function_table` +if the function pointer is possibly used from the outside of the module. +Eg. If the module passes a function pointer to a host function as +a callback. + **SIMD Vector types** The ABI for vector types is not stable and may change as new optimization opportunities are