Commit Graph

26046 Commits

Author SHA1 Message Date
Sven/Sarah Barth
9664ad4138 * use tparse_proc_flags for parse_proc_head as well 2022-05-26 21:42:53 +02:00
Sven/Sarah Barth
ee187f78f4 * have read_body return the created procdef 2022-05-26 21:42:53 +02:00
Sven/Sarah Barth
f6a444c6fc * combine the Boolean parameters of read_proc and read_proc_dec into a set 2022-05-26 21:42:53 +02:00
Sven/Sarah Barth
934e3bba63 * set proctypeoption for procvars 2022-05-26 21:42:52 +02:00
Sven/Sarah Barth
4bc957a1aa * extend procvar_dec so that procvars don't have to be registered 2022-05-26 21:42:52 +02:00
Sven/Sarah Barth
3aebcccdf2 * allow procvars to not be registered right away 2022-05-26 21:42:52 +02:00
Sven/Sarah Barth
a764c035b2 * if the symbol belongs to the current def also consider it a specialization if it's a nameless type symbol from an implicit function specialization as their owner gets changed to the function itself 2022-05-26 21:42:52 +02:00
Sven/Sarah Barth
6a6a17717a + add a new symoption for symbols created for nameless types during implicit function specialization so that they can be recognized 2022-05-26 21:42:52 +02:00
Sven/Sarah Barth
8bef91d1de * declare the type symbol of an internal def as sp_internal 2022-05-26 21:42:52 +02:00
Sven/Sarah Barth
30a7199165 * make the VMT symbol and type def of the corresponding class or object instead of having them be global
* bump PPU version to avoid potential compilation errors due to this

Based on code by Blaise.ru
2022-05-26 21:42:51 +02:00
Sven/Sarah Barth
ac4df2b066 * don't check for a duplicate internal symbol in inherited symtables 2022-05-26 21:42:51 +02:00
Sven/Sarah Barth
3ca3c7a606 - remove duplicate paraprintnodetree to ensure that there the right paraprintnodetree is used (namely the one from globals) 2022-05-26 21:42:51 +02:00
Nikolay Nikolov
6ee4ee960e + added "(experimental)" to the compiler help screen for the WebAssembly compiler options that are still unstable/experimental 2022-05-26 18:20:07 +03:00
Nikolay Nikolov
66b471e516 + support different versions of llvm-mc (version 10 seems to be the earliest that works) 2022-05-26 15:06:35 +03:00
Nikolay Nikolov
3994626cb1 * fixed the message in the previous commit 2022-05-26 14:14:46 +03:00
Nikolay Nikolov
0c6287894b * the WebAssembly internal assembler renamed WASM (previously it was OMF, which was the ID of the MS-DOS .obj writer, which I forgot to rename) 2022-05-26 14:12:10 +03:00
Pierre Muller
7c21b37105 Avoid some range check error and convert internalerror into error messages 2022-05-26 00:28:47 +02:00
Pierre Muller
e0de75224b Add help for -Aomf option for wasm32 CPU and new message for ogwasm binary writer 2022-05-26 00:28:47 +02:00
Nikolay Nikolov
16f5863847 + added WebAssembly atomic store intrinsics 2022-05-25 19:22:45 +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
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
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
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
florian
4c8e802dd3 * continue const. propagation after a for loop when possible 2022-05-22 22:52:18 +02: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
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
florian
c79df5f0fc * better constant propation for inline nodes 2022-05-19 22:28:58 +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
florian
81fd3e2748 * more readable fix for the missing ait_instruction check 2022-05-15 19:32:27 +02:00
J. Gareth "Curious Kit" Moreton
27db63969a * a64: Fix where hp1's was assumed to be an instruction and not actually checked 2022-05-15 16:47:55 +00:00