Jonas Maebe
0758aa1143
FPU exception mask: generlised system unit interface
2022-10-17 19:43:01 +00:00
Nikolay Nikolov
e3139fea21
+ setup a thread manager (functions are still not yet implemented), when the WASI RTL is compiled with multithreading support
2022-07-14 05:14:20 +03:00
Nikolay Nikolov
b900be6142
+ added WebAssembly intrinsics for reading __tls_size, __tls_align and __tls_base
2022-07-14 04:15:47 +03:00
Nikolay Nikolov
bc6ab39ea2
* WebAssembly exceptions fix: fixed raise without parameters in except..end
...
blocks in WebAssembly native and branchful exceptions mode. Fixes #39752
2022-06-21 05:43:35 +03:00
Nikolay Nikolov
48f115686d
+ print more exceptions debug info, when the WebAssembly RTL is compiled with -dEXCDEBUG
2022-06-21 04:47:04 +03:00
Nikolay Nikolov
1ce1a0fe1f
* added non-atomic implementations of the atomic operations in the WebAssembly unit, used when the RTL is compiled without -CTwasmthreads
2022-05-28 02:17:20 +03:00
Nikolay Nikolov
3cb4952745
* AtomicWait marked as inline
2022-05-25 20:18:07 +03:00
Nikolay Nikolov
a916aa36d8
+ added AtomicNotify() to the WebAssembly unit
2022-05-25 20:16:50 +03:00
Nikolay Nikolov
19cce3e42e
+ added AtomicWait() to the WebAssembly unit
2022-05-25 20:11:54 +03:00
Nikolay Nikolov
7cac9d2f02
+ added AtomicStore() to the WebAssembly unit
2022-05-25 19:39:17 +03:00
Nikolay Nikolov
16f5863847
+ added WebAssembly atomic store intrinsics
2022-05-25 19:22:45 +03:00
Nikolay Nikolov
219294c02b
+ added AtomicLoad() to the WebAssembly unit
2022-05-25 19:05:28 +03:00
Nikolay Nikolov
0103964250
+ implemented WebAssembly atomic load intrinsics
2022-05-25 18:55:41 +03:00
Nikolay Nikolov
9274f17c52
+ reserved inline numbers for the WebAssembly atomic loads and stores
2022-05-24 16:06:05 +03:00
Nikolay Nikolov
7fa8f514af
+ added AtomicCompareExchange() to the WebAssembly unit
2022-05-24 15:40:13 +03:00
Nikolay Nikolov
9ba01e7aee
+ added AtomicExchange() to the WebAssembly unit
2022-05-24 15:24:25 +03:00
Nikolay Nikolov
362cabe684
+ added AtomicAnd(), AtomicOr() and AtomicXor() to the WebAssembly unit
2022-05-24 15:21:59 +03:00
Nikolay Nikolov
99d66b4c93
+ added AtomicAdd() and AtomicSub() intrinsics to the WebAssembly unit
2022-05-24 15:16:40 +03:00
Nikolay Nikolov
585d0cf574
+ added unit WebAssembly for WebAssembly-specific stuff. Currently contains
...
the AtomicFence intrinsic, which emits the atomic.fence instruction.
2022-05-24 14:50:42 +03:00
Nikolay Nikolov
d9781bcebe
+ added except_branchful.inc as a system unit dependency include file to wasm32/makefile.cpu
2022-05-24 14:10:04 +03:00
Nikolay Nikolov
47c271dcd0
+ implemented InterlockedIncrement, InterlockedDecrement, InterlockedExchange,
...
InterlockedCompareExchange and InterlockedExchangeAdd for WebAssembly in a
thread safe way, using the thread and atomics extension, when the RTL is
compiled with -dFPC_WASM_THREADS
2022-05-22 06:34:10 +03:00
Nikolay Nikolov
f1cb5d8f71
+ support intrinsic for the memory.atomic.notify WebAssembly instruction
2022-05-21 18:03:14 +03:00
Nikolay Nikolov
86643710c4
+ support intrinsics for the WebAssembly memory.atomic.wait32 and memory.atomic.wait64 instructions
2022-05-21 17:53:38 +03:00
Nikolay Nikolov
e376851fd8
* fixes to the WebAssembly atomic function intrinsics
2022-05-21 16:29:28 +03:00
Nikolay Nikolov
e03b920520
+ added intrinsic support for the WebAssembly cmpxchg atomic operations as well
2022-05-21 02:52:31 +03:00
Nikolay Nikolov
d8f06aa4f1
+ added instrinsic support for the all the 2-parameter read-modify-write
...
WebAssembly atomic operations (add, sub, and, or, xor, xchg). Note that they
are not implemented in the internal assembler, yet.
2022-05-20 17:36:37 +03:00
Nikolay Nikolov
1d70437017
+ added intrinsic (for RTL internal use) that emits the WebAssembly atomic.fence instruction
2022-05-13 22:46:27 +03:00
Nikolay Nikolov
a62c7555d7
- removed the DebugWriteXXX functions from the WASI system unit, since console
...
output is now quite stable and can be used for debugging
2021-10-10 20:25:29 +03:00
Nikolay Nikolov
387c80cc57
+ default exception handling in WebAssembly native exceptions mode
2021-10-05 08:02:39 +03:00
Nikolay Nikolov
d9eb8d75b9
+ return a small, fake backtrace for WebAssembly, so that in case of a runtime
...
error, the message 'Runtime error XXX at $EEEEEEEE' appears.
2021-10-05 04:44:52 +03:00
Nikolay Nikolov
c0cec218d6
+ added unhandled exception handling code for the branchful exceptions mode
2021-10-05 04:06:56 +03:00
Nikolay Nikolov
7afb665c92
+ insert exception flag check and branch after each function call, when
...
compiling in WebAssembly branchful exceptions mode
2021-10-05 02:26:13 +03:00
Nikolay Nikolov
30b503abc4
* instead of using the 'throw' intrinsic, set a boolean flag, in the branchful
...
exceptions support code
2021-10-05 00:49:29 +03:00
Nikolay Nikolov
5124ab2521
* cloned the WebAssembly native exceptions code generation and rtl support into
...
the branchful exceptions (which will be modified later, but we're using this
as their starting point, because we can get a snapshot built, without compiler
internal errors)
2021-10-05 00:37:20 +03:00
Nikolay Nikolov
3258937d97
+ implemented move() for WebAssembly via the memory.copy instruction
2021-10-02 21:33:28 +03:00
Nikolay Nikolov
2e3e3edb5f
+ implemented FillChar for WebAssembly via the memory.fill instruction
2021-10-02 20:31:37 +03:00
Nikolay Nikolov
85207e94f8
+ added inline numbers for a memory.copy and a memory.fill intrinsic
2021-10-02 19:40:36 +03:00
Nikolay Nikolov
3836b0be04
* longjmp in fpc_reraise changed to a throw instruction intrinsic in wasm native exceptions mode
2021-09-28 04:02:52 +03:00
Nikolay Nikolov
0c3e179652
- get rid of fpc_PushExceptAddr and fpc_PopAddrStack entirely, when compiling in
...
wasm native exceptions mode - these helper routines aren't necessary in this
mode
2021-09-28 03:59:38 +03:00
Nikolay Nikolov
91f0f1a86c
* don't include except.inc if wasm32 native exception is turned on, instead
...
replace it with except_native.inc
2021-09-28 03:46:30 +03:00
Nikolay Nikolov
73bc8edef3
+ RTL support for raising exceptions in native wasm exceptions mode
2021-09-28 03:31:04 +03:00
Nikolay Nikolov
33e25a3dfe
+ added except_native.inc include file (empty for now, but will provide RTL
...
support for the native wasm exceptions in the future)
2021-09-18 03:08:48 +03:00
Nikolay Nikolov
c2754eac3f
+ introduced the wasm32_throw_fpcexception inline function, that emits a
...
'throw' instruction. This way we'll be able to emit this instruction from
RTL code (i.e. from fpc_raiseexception, when that is implemented for
WebAssembly)
2021-09-18 02:39:16 +03:00
nickysn
45620b11c0
+ enabled compilation of unit math for the WASI target
...
git-svn-id: trunk@49431 -
2021-06-01 16:56:55 +00:00
nickysn
cfc9838349
* fixed compilation of the embedded target
...
git-svn-id: branches/wasm@48462 -
2021-01-31 04:00:08 +00:00
nickysn
2c2f2189e3
+ write a debug output message and trap in FPC_LONGJMP for WebAssembly
...
git-svn-id: branches/wasm@48443 -
2021-01-28 13:02:26 +00:00
nickysn
4ef1367019
+ added wasm32 inline procedure for generating the 'unreachable' instruction
...
git-svn-id: branches/wasm@48442 -
2021-01-28 12:48:56 +00:00
nickysn
616db5df68
+ compile the strings unit for the wasi target
...
git-svn-id: branches/wasm@48427 -
2021-01-25 21:17:28 +00:00
nickysn
8c33dc4692
* return nil in get_caller_addr, get_caller_frame an sptr
...
git-svn-id: branches/wasm@48374 -
2021-01-24 02:18:20 +00:00
nickysn
54299874d3
+ implemented memory.grow and memory.size intrinsics and implemented SysOSAlloc
...
git-svn-id: branches/wasm@48290 -
2021-01-21 23:13:49 +00:00