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
8c562995d7
* regenerate makefiles with latest fpcmake
2022-05-24 14:01:59 +03:00
Nikolay Nikolov
e74797d411
* replaced several internal errors, related to the WebAssembly labels
...
resolution with more meaningful error messages, in order to ease the
debugging of the compiler. Based on patch by Pierre.
2022-05-24 11:44:15 +03:00
Nikolay Nikolov
748f71e5bb
+ enabled compilation of units variants and rtti, bug #39579 is now fixed
2022-05-24 11:18:52 +03:00
Nikolay Nikolov
6e4e3b8580
* fixed WebAssembly code generation in thlcgwasm.g_overflowCheck_loc (patch by Pierre)
2022-05-24 11:06:59 +03:00
Nikolay Nikolov
8bea5dd41e
* WebAssembly code generation fix in thlcgwasm.a_op_reg_reg_reg_checkoverflow, based on patch by Pierre (but simplified, to use a single block)
2022-05-24 11:00:10 +03:00
Nikolay Nikolov
283c213a0c
* patch by Pierre, which fixes WebAssembly code generation for signed div/mod with overflow checking
2022-05-24 10:47:38 +03:00
Nikolay Nikolov
0f4340e659
* fix regressions after previous patch by correctly parsing output, which does not contain '##WASI-EXITCODE:'
2022-05-24 10:30:20 +03:00
Nikolay Nikolov
a8b789d183
* patch from Pierre for working around the exitcode <= 125 limitation in wasmtime
2022-05-24 10:15:44 +03:00
florian
32fa0ecaf9
* cleanup
2022-05-23 22:28:59 +02:00
florian
e8e53d13cd
* fix #39730 as suggested by Jonas
2022-05-23 22:28:59 +02:00
mattias
172803b2f7
fcl-passrc: fixed compile pas2js
2022-05-23 00:55:46 +02:00
mattias
1b7aefc11d
fcl-json: fixed compile pas2js
2022-05-23 00:55:37 +02:00
mattias
f2ba814b9e
fcl-json: StringToJSON: fixed pas2js compile and less mem allocations
2022-05-23 00:50:18 +02:00
mattias
20e3a7311c
pastojs: fixed absolute result
2022-05-22 23:46:29 +02:00
florian
4c8e802dd3
* continue const. propagation after a for loop when possible
2022-05-22 22:52:18 +02:00
mattias
bcea5581de
pastojs: fixed call inherited of nested class
2022-05-22 19:56:39 +02:00
marcoonthegit
db9375d23f
* add GetDateFormatEx, from bug #35118 by 440bx
2022-05-22 12:37:58 +02: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
Jonas Maebe
ccc843f983
llvmdbg: emit uppercase symbol names unless C++-style debug info is selected
...
Otherwise gdb won't find the symbols unless you use the exact case
2022-05-21 22:32:35 +02:00
Jonas Maebe
9a7a97175e
llvmdbg: emit debug information for global variables
2022-05-21 22:32:35 +02:00
Jonas Maebe
1b393c80aa
llvmdbg: fix missing initialisation when there are no procedures
2022-05-21 22:32:35 +02:00
Jonas Maebe
d0bf7acc18
llvmdbg: build hashtable to lookup llvmdecl belonging to a global variable
...
We need to attach the debug info to it
2022-05-21 22:32:35 +02:00
Jonas Maebe
e865ab4c3a
llvmdbg: handle nil in more places
...
"void" is represented as "null" in LLVM debug information, which we represent
by nil
2022-05-21 22:32:35 +02:00
Jonas Maebe
a33e6230a0
llvm metadata: add DIGlobalVariableExpression enum
...
Only documented as of LLVM 9.0, but existed already in 7.0.
Also fixed DIGlobalVariable not being marked as unique
2022-05-21 22:32:35 +02:00
Jonas Maebe
f896766837
agllvm: fix writing metadata operands for variable declarations
2022-05-21 22:32:35 +02:00
florian
91481a5fae
* more robust code for constant propagation in for loops
2022-05-21 22:32:23 +02: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
3cfdf000a2
+ support the new WebAssembly threads and atomics instructions in the internal assembler
2022-05-21 17:24:21 +03:00
Nikolay Nikolov
e376851fd8
* fixes to the WebAssembly atomic function intrinsics
2022-05-21 16:29:28 +03:00
mattias
08a9b16c82
fcl-json: fixed tests
2022-05-21 03:31:42 +02:00
mattias
5700cb56ac
fcl-json: fixed StringToJSONString
2022-05-21 03:27:27 +02:00
Nikolay Nikolov
e03b920520
+ added intrinsic support for the WebAssembly cmpxchg atomic operations as well
2022-05-21 02:52:31 +03:00
florian
a1ee4e04ed
* if a for loop does not change a variable, we can propate it if it is a constant, resolves #39726
2022-05-20 22:52:27 +02:00
Jonas Maebe
8817e896db
Add missing reference increases for ait_jvar labels
2022-05-20 21:18:44 +02: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
Karoly Balogh
c5a443d0dd
amunits: correct the HookEntry wrapper functions to new compiler behavior. at some point during 3.3.1, the compiler started to omit stackframes when not needed, which broke the previous assumptions about stackframe handling
2022-05-20 01:55:52 +02:00
florian
c79df5f0fc
* better constant propation for inline nodes
2022-05-19 22:28:58 +02:00
mattias
621f3b8387
fcl-passrc: fixed compile pscanner with pas2js
2022-05-19 09:51:38 +02:00
mattias
f102e40b69
fcl-passrc: moved ReadNextPascalToken to fpscanner
2022-05-19 09:46:40 +02:00
mattias
dd6ccd0fb4
fcl-json: fixed compile with fpc 3.2.2
2022-05-19 09:46:15 +02:00
Michaël Van Canneyt
1b22a68fc6
* Export wasiAlloc and wasiFree
2022-05-18 14:48:11 +02:00
Michaël Van Canneyt
050153fb50
* Make sure webcompiler works again
2022-05-18 12:36:31 +02:00
Pierre Muller
5203c3e849
Add dumping of backtrace in case of unhandled exception inside TCustomInstaller.Run method
2022-05-17 23:28:47 +02:00
Pierre Muller
be969205ad
Do not alloc/dealloc NR_DEFAULTFLAGS for wasm32, as it is NR_NO
2022-05-17 22:47:13 +02:00
florian
9f47e21da3
* increase default dwarf version for linux targets where current distributions exist
2022-05-16 22:56:30 +02:00
Pierre Muller
7f886cc4b0
Call increfs manually to avoid removal of stabs debug related labels
2022-05-16 15:12:07 +00:00