Commit Graph

59 Commits

Author SHA1 Message Date
Nikolay Nikolov
39fb7618e4 * WebAssembly internal linker: refactored the writing of the memory section and
the memory import section: introduced a TWasmMemoryType record, and structures
  for holding the memory entries in the import and memory sections, instead of
  writing them in an ad hoc manner. The memory information in the linker map
  file is now also a little more detailed.
2025-02-16 03:22:20 +02:00
Nikolay Nikolov
c005544f3d + WebAssembly internal linker: write the global section in the linker map file 2025-02-16 02:11:52 +02:00
Nikolay Nikolov
b9ca30165c * WebAssembly: refactored tai_local, so that it is a single directive,
containing multiple locals, instead of creating multiple tai_local directives,
  each containing a single local. No functional changes.
2024-09-15 00:49:05 +03:00
Nikolay Nikolov
26c69d564f + introduced WebAssembly helper is_atomic_op 2024-07-07 10:42:28 +03:00
Nikolay Nikolov
04a077707c * fix warning 2024-01-17 09:43:51 +02:00
Nikolay Nikolov
03fc5d2323 + added a zero/unitialized/unknown value to TWasmBasicType: wbt_Unknown 2024-01-17 08:32:10 +02:00
Nikolay Nikolov
52f0ec579e + added TWasmFuncType.ToString implementation 2023-12-31 21:49:35 +02:00
Nikolay Nikolov
57aead9a14 + added const sets for the WebAssembly reference, numeric and vector types 2023-12-24 16:35:39 +02:00
Nikolay Nikolov
2626b85984 + introduced decode_wasm_basic_type function 2023-12-24 14:30:06 +02:00
Nikolay Nikolov
11712658b0 + implemented WebAssembly code generator support for funcref and externref data
types, using new register types R_FUNCREFREGISTER and R_EXTERNREFREGISTER
2023-06-07 05:25:57 +03:00
Nikolay Nikolov
3b3a0a660c * the a_ref_null instruction split into two subinstructions - a_ref_null_externref and a_ref_null_funcref 2023-06-07 01:42:46 +03:00
Nikolay Nikolov
7bd1ac4507 * fixed comment 2022-07-25 01:57:13 +03:00
Nikolay Nikolov
7475d22154 + declare the three magic global variables (__tls_size, __tls_align, __tls_base), created by the linker, when WebAssembly multithreading is enabled 2022-07-14 03:57:06 +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
3a095f5ed5 + support all the new types in encode_wasm_basic_type 2022-05-28 00:30:43 +03:00
Nikolay Nikolov
907e8402ab + added the WebAssembly reference and vector types to TWasmBasicType 2022-05-28 00:16:51 +03:00
Nikolay Nikolov
2888710594 + added the WebAssembly table instructions 2022-05-28 00:02:27 +03:00
Nikolay Nikolov
534383f686 + added the WebAssembly reference instructions ref.null, ref.is_null and ref.func 2022-05-27 23:58:27 +03:00
Nikolay Nikolov
e2eadc51a3 + added the memory.init and data.drop instructions 2022-05-27 23:38:49 +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
5198e47e36 + added the atomic memory access WebAssembly instructions from the threading proposal for WebAssembly 2022-05-13 20:55:12 +03:00
J. Gareth "Curious Kit" Moreton
2dc0995067 - Bug fix to new ADD/SUB optimisation where conditions are concerned
- Register allocation fixes for overflow checks
2021-11-17 20:18:57 +00:00
Nikolay Nikolov
026d23632a + added the memory.copy and memory.fill WebAssembly instructions 2021-10-02 19:35:26 +03:00
Nikolay Nikolov
e0ad427b6c + introduced the FPC_EXCEPTION_TAG_SYM string constant 2021-09-27 17:38:28 +03:00
Nikolay Nikolov
ca70cb05a7 * fixed warning 2021-09-26 07:54:20 +03:00
Nikolay Nikolov
d7b141d70e + implemented the if, loop and else instructions 2021-09-26 07:45:14 +03:00
Nikolay Nikolov
81b8574bfd + implemented all the load/store instructions in the wasm internal asm
writer (previously, only i32.load and i32.store were implemented)
2021-09-26 06:49:51 +03:00
Nikolay Nikolov
4ca39cf07d + write the import functions in the wasm binary writer 2021-09-23 17:11:24 +03:00
Nikolay Nikolov
a58368d20d + avoid duplicate functypes in the types section of the wasm module we produce 2021-09-20 19:33:48 +03:00
Nikolay Nikolov
628fcb9b1c + create the Type wasm section 2021-09-20 03:43:23 +03:00
Nikolay Nikolov
10d8332563 + added the new WebAssembly instructions, added by the exception handling proposal 2021-09-16 23:45:03 +03:00
nickysn
e2e0756eaf * fixed compilation with -Sew
git-svn-id: branches/wasm@48446 -
2021-01-28 16:25:03 +00:00
nickysn
0ceefa4d22 + enabled DWARF debug info writing on the WebAssembly target. Note that it
doesn't work yet (produces internal errors).

git-svn-id: branches/wasm@48445 -
2021-01-28 16:16:32 +00:00
nickysn
f891c52dd1 - removed tarrayreftype, because it's not used on the wasm target
git-svn-id: branches/wasm@48336 -
2021-01-22 21:47:08 +00:00
nickysn
5a84c4db61 - get rid of FRAME_POINTER_SYM and BASE_POINTER_SYM - they should not be used anymore
git-svn-id: branches/wasm@48331 -
2021-01-22 16:24:56 +00:00
nickysn
83f88e515b * renamed the a_get/set/tee_local/global asm ops a_local/global_set/get/tee
git-svn-id: branches/wasm@48324 -
2021-01-22 15:21:40 +00:00
nickysn
d8f55ebb48 * renamed the a_iXX_extendYYYY family of asm ops to their modern versions
git-svn-id: branches/wasm@48323 -
2021-01-22 15:08:43 +00:00
nickysn
116366a8e3 * updated the a_iXX_trunc_su_fYY asm ops to their modern format a_iXX_trunc_fYY_su
git-svn-id: branches/wasm@48322 -
2021-01-22 15:05:35 +00:00
nickysn
60242ca0fd * updated the a_fXX_convert_su_iYY asm ops to their modern format a_fXX_convert_iYY_su
git-svn-id: branches/wasm@48321 -
2021-01-22 15:03:04 +00:00
nickysn
9acfdc8cdd * the a_f64_reinterpret_f64 asm op renamed a_f64_reinterpret_i64
git-svn-id: branches/wasm@48320 -
2021-01-22 14:58:50 +00:00
nickysn
699626ee5c * a_grow_memory asm op renamed a_memory_grow
git-svn-id: branches/wasm@48319 -
2021-01-22 14:52:46 +00:00
nickysn
d0fe45a595 * a_current_memory asm op renamed a_memory_size
git-svn-id: branches/wasm@48318 -
2021-01-22 14:51:55 +00:00
nickysn
b6735179ed * use a functype operand for a_if, instead of hardcoding
git-svn-id: branches/wasm@48028 -
2021-01-04 11:01:18 +00:00
nickysn
fc95e7f22d * fixes in thlcgwasm.resize_stack_int_val
git-svn-id: branches/wasm@47974 -
2021-01-02 14:42:10 +00:00
nickysn
763ca253c1 + introduced the TWasmFuncType class - used to hold a Wasm function signature
git-svn-id: branches/wasm@47963 -
2021-01-02 11:54:41 +00:00
nickysn
f138d66a2a * switch NR_FRAME_POINTER_REG to NR_LOCAL_FRAME_POINTER_REG
git-svn-id: branches/wasm@47874 -
2020-12-28 18:38:43 +00:00
nickysn
170fab85ff + introduced RS_EVAL_STACK_BASE and RS_LOCAL_STACK_POINTER_REG
git-svn-id: branches/wasm@47873 -
2020-12-28 18:32:16 +00:00
nickysn
59c9bff744 * updated first_int/fpu/mm_imreg, so it doesn't clash with the non-imaginary registers
git-svn-id: branches/wasm@47828 -
2020-12-21 00:32:36 +00:00
nickysn
40eb696d8e + defined RS_LOCAL_FRAME_POINTER_REG
git-svn-id: branches/wasm@47827 -
2020-12-21 00:31:24 +00:00
nickysn
f572bcf8f3 + introduced the NR_LOCAL_FRAME_POINTER_REG constant (alias for NR_R3)
git-svn-id: branches/wasm@47780 -
2020-12-15 15:08:24 +00:00