-
Notifications
You must be signed in to change notification settings - Fork 740
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for multiple tables and update CFI
This commits makes a number of changes to the WebAssembly format, some of which exceed the feature set desired for the MVP. (1) It adds support for updated table definitions, including the default, elementType, initial, and max attributes, plus a name. Currently, the initial and max attributes must be equal to the number of elements. The elementType attribute is interpreted as a FunctionType index, and type homogeneity is enforced on table elements, unless the specified FunctionType has name "anyfunc", which corresponds to a FunctionType with a none parameter and return type none. Format: (table <name> [default] <type> <entries>) (2) It adds support for multiple tables. If tables are used, currently the first table must be default, and the remainder must not. Example: (table "foo" default (type $FUNCSIG$i) $a) (table "bla" (type $anyfunc) $b $c $d) (3) Indirect calls have an immediate argument that specifies the index of the function call table. Example: (call_indirect "foo" $FUNCSIG$i (get_local $1)) (4) Corresponding upstream LLVM changes are required to use multiple tables, but the updated format is backwards compatible. Example: i32.call_indirect $0=, $pop0 i32.call_indirect.1 $0=, $pop0, $1, $2, $3 (5) Generating WebAssembly from code built with Clang/LLVM CFI now utilizes multiple tables. This is the only enabled use case for multiple tables; all others will default to a single table, if tables are used. The value passed in the .indidx assembler directive is now interpreted as the index of the indirect call table to assign.
- Loading branch information
Showing
48 changed files
with
531 additions
and
319 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.