Nikolay Nikolov
7cbf18c6f3
* don't create block..end_block around WebAssembly inline asm routines
2024-07-16 16:53:55 +03:00
Nikolay Nikolov
65d4319dc2
* don't do anything in postprocess_code for WebAssembly inline asm routines
2024-07-16 16:28:32 +03:00
Nikolay Nikolov
4adac78f85
+ respect the nostackframe directive in WebAssembly inline asm routines
2024-07-16 15:25:12 +03:00
Nikolay Nikolov
83a8d584e0
+ set result.ops in twasmreader.HandlePlainInstruction
2024-07-16 15:13:56 +03:00
Nikolay Nikolov
d9e3afcb1d
+ actually enable the parsing of WebAssembly inline asm instructions
2024-07-16 14:53:56 +03:00
Nikolay Nikolov
fd1fb255a6
* started implementing twasmreader.HandleBlockInstruction
2024-07-16 14:48:55 +03:00
Nikolay Nikolov
152bb316c3
+ call ConcatInstruction for plain instructions in twasmreader.HandleInstruction
2024-07-16 12:58:47 +03:00
Nikolay Nikolov
8ec86ad053
+ insert plain instructions and parse nested instructions in twasmreader.HandleFoldedInstruction
2024-07-16 02:04:58 +03:00
Nikolay Nikolov
95593f15dd
+ handle the local and global variable instructions with a constant integer
...
parameter in twasmreader.HandlePlainInstruction
2024-07-16 01:38:57 +03:00
Nikolay Nikolov
ea988e0b92
+ recognize the memory access instructions with an optional memarg operand (not
...
parsed, yet) in twasmreader.HandlePlainInstruction
2024-07-15 20:27:32 +03:00
Nikolay Nikolov
09f2fa0daf
+ support the f32.const and f64.const instructions in twasmreader.HandlePlainInstruction
2024-07-15 20:20:13 +03:00
Nikolay Nikolov
8e79108e51
* changed twasmreader.HandlePlainInstruction to return an instruction
2024-07-15 16:49:06 +03:00
Nikolay Nikolov
c1c1d46c15
+ parse the instructions with integer parameter i32.const and i64.const in twasmreader.HandlePlainInstruction
2024-07-15 16:49:06 +03:00
Nikolay Nikolov
748dbbcb20
* fixed another warning
2024-07-14 00:09:18 +03:00
Nikolay Nikolov
4c3d8d016e
+ added else clause to silence warning, treated as error in CI
2024-07-13 12:21:36 +03:00
Nikolay Nikolov
c6e715a54e
+ WebAssembly inline assembler instruction parsing work in progress
2024-07-12 23:35:38 +03:00
Nikolay Nikolov
0c61c7057a
* fixed some WebAssembly instruction names in the wasm_op2str array
2024-07-12 16:09:07 +03:00
Nikolay Nikolov
4c787b4b9f
+ started working on a WebAssembly inline assembler reader. Not ready, yet, just
...
includes a basic tokenizer for now.
2024-07-12 16:02:19 +03:00
Nikolay Nikolov
35701f8fa2
* fail with an internal compiler error in case an atomic WebAssembly instruction
...
is generated, while WebAssembly multithreading is disabled
2024-07-07 16:43:41 +03:00
Nikolay Nikolov
26c69d564f
+ introduced WebAssembly helper is_atomic_op
2024-07-07 10:42:28 +03:00
Nikolay Nikolov
cdba427bcf
+ added WASI multithreading helper for setting the stack pointer for the linear stack
2024-05-13 14:00:36 +02:00
Michaël Van Canneyt
3302dae600
* hlgcodegen needed when creating module info (fixes AV)
2024-05-04 16:44:33 +02:00
J. Gareth "Curious Kit" Moreton
b804fc5164
* Flags specific to TAddNode have been moved to their own field
2024-03-02 21:31:21 +01:00
Nikolay Nikolov
6a28ac53da
+ support the native exception instructions in TWasmValidationStacks.Validate
2024-02-27 12:54:56 +02:00
Nikolay Nikolov
9da276b352
* fixed bug in thlcgwasm.a_op_reg_reg_reg_checkoverflow that used to generate
...
code that fails WebAssembly validation
2024-02-27 11:59:39 +02:00
Nikolay Nikolov
f2d739b93a
+ perform WebAssembly validation, if the compiler is compiled with the
...
DEBUG_WASM_VALIDATION defined
2024-02-26 12:13:59 +02:00
Nikolay Nikolov
0ae014a98f
+ support the BR and BR_IF instructions in TWasmValidationStacks.Validate
2024-02-25 13:52:34 +02:00
Nikolay Nikolov
13f58fe343
+ support if,block,loop,else,end_if,end_block,end_loop in TWasmValidationStacks.Validate
2024-02-25 13:08:41 +02:00
Nikolay Nikolov
472f9be9a6
+ support the global.get and global.set instructions in TWasmValidationStacks.Validate
2024-02-25 11:38:36 +02:00
Nikolay Nikolov
ab65c9889b
+ added the WasmBasicType to TWasmGlobalAsmSymbol. This will help WebAssembly
...
validation and stack tracking.
2024-02-25 08:54:39 +02:00
Nikolay Nikolov
f4b9d51aff
+ introduced TWasmGlobalAsmSymbol subclass of TAsmSymbol. Use it for all
...
AT_WASM_GLOBAL symbols. This allows in the future to add extra data to the
TWasmGlobalAsmSymbol, such as the WebAssembly global type, which will aid in
WebAssembly validation and stack tracking.
2024-02-25 07:29:56 +02:00
Nikolay Nikolov
81d98f5ae2
+ support the CALL instruction in TWasmValidationStacks.Validate
2024-02-25 04:51:14 +02:00
Nikolay Nikolov
21cc89f1e3
+ added a second TWasmFuncType parameter to the CALL WebAssembly instruction. It
...
is not part of the WebAssembly syntax and binary encoding, but it helps
WebAssembly stack tracking and validation.
2024-02-25 04:48:17 +02:00
Nikolay Nikolov
2dcb15f88f
+ support a_call_indirect in TWasmValidationStacks.Validate
2024-02-24 10:49:15 +02:00
Nikolay Nikolov
26855a29c8
* fix warning
2024-02-08 16:54:33 +02:00
Nikolay Nikolov
e073d5f7f7
+ implemented support for the local.get, local.set and local.tee instructions in TWasmValidationStacks.Validate
2024-02-08 16:49:45 +02:00
Nikolay Nikolov
28c4c58b34
* fix warning
2024-02-05 23:35:45 +02:00
Nikolay Nikolov
d7581aa1ee
+ implemented TWasmValidationStacks.Validate for many (but not all, yet) instructions
2024-02-05 23:29:44 +02:00
Nikolay Nikolov
e53620ebdb
* fix warnings
2024-02-01 01:20:15 +02:00
Nikolay Nikolov
5e0dcfb49b
+ introduced TWasmValidationStacks.Unreachable
2024-01-31 02:57:19 +02:00
Nikolay Nikolov
24315a7f28
+ introduced TWasmValidationStacks.label_types
2024-01-31 02:45:43 +02:00
Nikolay Nikolov
f3e667da42
+ introduced TWasmValidationStacks.PopCtrl
2024-01-31 02:38:09 +02:00
Nikolay Nikolov
4cb97dcdb3
* fixed warning
2024-01-31 02:33:31 +02:00
Nikolay Nikolov
4cc5cf4d0e
+ introduced TWasmValidationStacks.PushCtrl
2024-01-31 02:25:44 +02:00
Nikolay Nikolov
18c6e13f45
* fixed warning
2024-01-31 02:19:03 +02:00
Nikolay Nikolov
064adbf3f8
+ introduced TWasmValidationStacks.PopVals
2024-01-31 02:15:09 +02:00
Nikolay Nikolov
4d5479741d
+ introduced TWasmValidationStacks.PushVals
2024-01-31 02:11:59 +02:00
Nikolay Nikolov
2d5c1d43cf
+ introduced TWasmValidationStacks.PopVal(expect)
2024-01-31 02:10:05 +02:00
Nikolay Nikolov
d575aa5240
+ introduced TWasmBasicTypeList
2024-01-31 01:55:38 +02:00
Nikolay Nikolov
1786875319
+ implemented TWasmValueStack.GetCount
...
+ implemented TWasmControlStack.GetCount
+ implemented TWasmValidationStacks.PopVal
2024-01-31 01:52:05 +02:00