Commit Graph

86 Commits

Author SHA1 Message Date
Nikolay Nikolov
0be3fe9ab4 - removed TWasmObjData.AddFuncType, instead call directly [F]FuncTypes.AddOrGetFuncType 2023-12-31 15:52:27 +02:00
Nikolay Nikolov
3defa34470 + check whether all br instructions, generated by goto point to a pascal goto label 2023-10-22 05:23:04 +03:00
Nikolay Nikolov
31dff18a61 * refactored the taicpu_wasm_structured_instruction descendants to use a wstyp enum variable, instead of using the 'is' operator to determine the class type 2023-10-22 04:33:29 +03:00
Nikolay Nikolov
84e2613ca8 * refactor: wasm_convert_to_flat_asmlist and wasm_convert_to_structured_asmlist now accept a single var parameter 2023-10-22 03:11:28 +03:00
Nikolay Nikolov
84186db35f * support local.get/set/tee with a const parameter in the wasm internal assembler writer 2023-10-22 00:52:37 +03:00
Nikolay Nikolov
ce742b5b4d * convert loop..end_loop blocks to flat list + branch instruction 2023-10-18 03:45:02 +03:00
Nikolay Nikolov
9584348c40 + added amfrtDeleteAi, support deleting instructions in map_structured_asmlist_inner 2023-10-18 03:31:11 +03:00
Nikolay Nikolov
0f07c966b6 * convert if structured instructions to br_if + labels 2023-10-18 02:31:58 +03:00
Nikolay Nikolov
59128241ad + support mapping of structured instructions also in map_structured_asmlist_inner 2023-10-18 01:59:55 +03:00
Nikolay Nikolov
d911e462b2 + added support for params and results in tai_wasmstruc_if.ConvertToBrIf 2023-10-17 03:00:23 +03:00
Nikolay Nikolov
c2173185e7 + added method tai_wasmstruc_if.ConvertToBrIf 2023-10-17 02:11:46 +03:00
Nikolay Nikolov
bc7b113e09 + convert wasm structured list to flat list 2023-10-17 00:14:12 +03:00
Nikolay Nikolov
ea18d11d41 * fixed crash in map_structured_asmlist_inner, when the TAsmList parameter is nil 2023-10-16 23:22:10 +03:00
Nikolay Nikolov
e0c41ebc5a * fixed hang in map_structured_asmlist_inner 2023-10-16 23:21:28 +03:00
Nikolay Nikolov
3c19adda78 * moved the code that converts branch numbers to labels in the cpupi unit and call it from resolve_labels_complex 2023-10-16 23:09:56 +03:00
Nikolay Nikolov
267b99a8aa + added code for creating labels, associated with blocks and converting branch with consts to the corresponding block's label 2023-10-16 22:39:32 +03:00
Nikolay Nikolov
e318348372 + added a block stack parameter to TAsmMapFunc 2023-10-16 20:55:53 +03:00
Nikolay Nikolov
3f4c41b45f + introduced twasmstruc_stack 2023-10-16 20:38:56 +03:00
Nikolay Nikolov
c97fa0a05d + introduced map_structured_asmlist 2023-10-14 02:18:47 +03:00
Nikolay Nikolov
8e66041b79 + fix for the conversion of try..catch blocks to structured form 2023-10-05 20:50:24 +03:00
Nikolay Nikolov
11b743fd6a + also check for unexpected delegate instructions when converting to wasm structured form 2023-10-05 20:40:27 +03:00
Nikolay Nikolov
84f0b94549 + more consistency checks for unexpected instructions when converting to wasm structured instruction form 2023-10-05 20:24:43 +03:00
Nikolay Nikolov
089e7ca6c8 + added compiler internal error when encountering certain unexpected wasm instructions (indicating improper nesting) 2023-10-05 20:19:08 +03:00
Nikolay Nikolov
595402cac7 + added else to case statement to avoid warning 2023-10-05 19:19:59 +03:00
Nikolay Nikolov
a5f1600275 + avoid more warnings 2023-10-05 19:12:26 +03:00
Nikolay Nikolov
da4980c4c0 + added else to case statement, avoid the warning, produce an internal error in this unexpected case 2023-10-05 19:05:39 +03:00
Nikolay Nikolov
16b14c574e * constructors made public to avoid warnings 2023-10-05 18:58:45 +03:00
Nikolay Nikolov
0680ea46c8 * set typ of wasm structured instructions to ait_wasm_structured_instruction 2023-10-05 15:15:19 +03:00
Nikolay Nikolov
6ff4031398 * fixed more bugs in the wasm structured asmlist construction 2023-10-05 15:09:05 +03:00
Nikolay Nikolov
fff60f9f67 * fixed bug in wasm_convert_to_structured_asmlist 2023-10-05 15:04:42 +03:00
Nikolay Nikolov
a37430c245 + added code for converting wasm asmlists to structured lists (i.e. lists, using the new wasm structured instructions classes) 2023-10-03 23:35:46 +03:00
Nikolay Nikolov
dec6255a19 + introduced classes for WebAssembly structured form of instructions 2023-10-03 18:47:37 +03:00
Nikolay Nikolov
a0b78ad1f7 + WebAssembly internal assembler support for the ref.is_null instruction 2023-06-07 06:38:25 +03:00
Nikolay Nikolov
2039509cfb + WebAssembly internal asm support for the ref.null instruction 2023-06-07 06:13:17 +03:00
Nikolay Nikolov
c6af4df9b9 + declare user-defined wasm globals in the llvm-mc assembly output 2022-07-25 05:35:00 +03:00
Nikolay Nikolov
d378240134 + added the WebAssembly saturating truncation instructions to the internal assembler 2022-05-28 17:41:28 +03:00
Nikolay Nikolov
0ba7ef98b3 + support the memory.init and the data.drop instructions in the internal asm writer for WebAssembly 2022-05-28 16:00:43 +03:00
Nikolay Nikolov
3cfdf000a2 + support the new WebAssembly threads and atomics instructions in the internal assembler 2022-05-21 17:24:21 +03:00
Nikolay Nikolov
812736bd41 + support the atomic.fence instruction in the WebAssembly internal object writer 2022-05-13 22:56:36 +03:00
Nikolay Nikolov
6f88919f37 - don't set casmdata in wasm32/aasmcpu.pas, so that the aasmdef unit can override it 2021-10-03 00:59:11 +03:00
Nikolay Nikolov
026d23632a + added the memory.copy and memory.fill WebAssembly instructions 2021-10-02 19:35:26 +03:00
Nikolay Nikolov
f42817d1a2 * fixed opcode generation for the f32.const in the WebAssembly internal asm 2021-09-29 03:56:13 +03:00
Nikolay Nikolov
b463f2a141 + added support for exception tags and for the 'throw' and 'catch' instructions
in the wasm internal assembler and object writer
2021-09-27 21:44:09 +03:00
Nikolay Nikolov
b46c010f82 + also support immutable wasm globals in the wasm assembler writer (both internal and external) 2021-09-27 05:40:26 +03:00
Nikolay Nikolov
2bce4d36db + proper support for WASM globals in the internal object writer - emit
relocations, generate a Global section, if they are declared in the object
  file, etc.
2021-09-27 04:24:49 +03:00
Nikolay Nikolov
8226233aa3 * introduced the tai_globaltype asm directive, use that to declare the stack
pointer global symbol
2021-09-27 02:39:43 +03:00
Nikolay Nikolov
10db5ea5dc + implemented the 'delegate' and the 'rethrow' instructions in the wasm internal assembler 2021-09-26 23:58:21 +03:00
Nikolay Nikolov
6fb4b9b7dd + support the 'try' instruction in the wasm internal assembler 2021-09-26 23:50:02 +03:00
Nikolay Nikolov
346b57e238 * tai_impexp renamed tai_export_name
* ait_importexport renamed ait_export_name
2021-09-26 18:35:10 +03:00
Nikolay Nikolov
2940d0f45f - removed unused constructor of tai_impexp, as well as unused member variable extmodule 2021-09-26 18:29:28 +03:00