Commit Graph

65345 Commits

Author SHA1 Message Date
florian
eaeb8b70ff + added Risc-V register information file generation to the compiler Makefile
* more stringent naming of register file information for Risc-V
2022-05-31 22:38:30 +02:00
Pierre Muller
2cdbdcd5c5 Manually increase refs of newly created labelsymbol in insertpcrelativedata 2022-05-31 14:26:00 +00:00
Pierre Muller
f27b55e9b2 Also add a comment when a label has been optimized out when compiled DEBUG_LABEL 2022-05-31 13:00:04 +00:00
Pierre Muller
ad72542e9e Fix compilation of sparc compiler with -dDEBUG_ALL_OPT 2022-05-31 11:47:24 +00:00
Sven/Sarah Barth
5a680f0148 * fix #39745: the conversion from ordinals to pointer types in mode Delphi is not allowed for a void type (happens when using a typecast to convert a method without parameters to a function reference)
+ added test
2022-05-30 23:05:45 +02:00
florian
252707a873 + "rescued" mkrvreg.pp from old svn data 2022-05-30 21:12:37 +02:00
florian
ae457a18ad * unified Risc-V 32 and 64 register data file 2022-05-30 21:10:34 +02:00
florian
5d6ef0f70c * cleanup 2022-05-30 18:40:35 +02:00
Jonas Maebe
59f293711a function references: make names of interface methods valid Pascal identifiers
On high level targets, and on PowerPC/PowerPC64, interface method thunks are
implemented using internally-generated Pascal wrappers, so the method names
need to be valid Pascal identifiers.

Additionally, that wrapper code uses the procsym's realname, so also
update the realname field when changing the name of anonymous methods.
2022-05-29 23:07:13 +02:00
Sven/Sarah Barth
29cfa3b225 * ensure that the VMT for the function reference interface is generated correctly, but for this the invokedef needs to be copied without hidden parameters (and handle_calling_convention will be done by the VMT builder as well) 2022-05-29 14:44:11 +02:00
Sven/Sarah Barth
dadc10658c * set the correct symtable level for the invoke procdef 2022-05-29 14:44:11 +02:00
Jonas Maebe
60b0bc5535 read_record_fields: fix overflows of variant record size variables
Could happen in case of > 32 bit variant parts, or variant parts at offsets
> 32 bit offsets.

Fixes webtbs/tw9039c with a compiler compiled with -Cr
2022-05-29 13:33:27 +02:00
Jonas Maebe
a19deace45 llvmdbg: fix overflows for aggregates > 2^61 bytes
LLVM does not support aggregates larger than that at all, because internally
it stores all sizes in bits in an uint64. Their rationale for not having
special support for that is that there is no hardware with full 64 bit VM
address space anyway. So truncate our size emissions in debug info also to
that.
2022-05-29 13:33:27 +02:00
Jonas Maebe
9e7895575e tarraydef.elecount: fix overflow detection
It did not trigger in case of an array[0..high(asizeint)]. Fixes compilation
of webtbs/tw9039[ab] with a compiler built with range checking enabled.
2022-05-29 13:33:27 +02:00
Jonas Maebe
743d7c50d0 do_set: immediately exit in case of range error
Prevents run time error in case of a compiler compiled with range checks
enabled (webtbf/tw10890a)
2022-05-29 13:33:27 +02:00
Jonas Maebe
70908b1449 llvm: support for adding/subtracting constants to pointers in typed constants
Fixes webtbs/tw34027 for llvm
2022-05-29 13:33:27 +02:00
Jonas Maebe
573f2c20d7 taddnode.cmp_of_disjunct_ranges: fortify in case of programs with errors
Fixes compilation of webtbf/tw3116 with a compiler compiled with -Cr
2022-05-29 13:33:27 +02:00
Jonas Maebe
8c67a4370b rautils: don't interpret ".L3" as potentially meaning "unitx.identifier"
Fixes compilation of webtbs/tw10641.pp with a compiler compiled with
range checking
2022-05-29 13:33:27 +02:00
florian
390084d59e * tests fixed 2022-05-29 10:37:24 +02:00
Marcus Sackrow
638de87a5a AThreads: prevent deadlock for event set before waited 2022-05-28 22:46:50 +02:00
florian
4556cb35d1 + completed Risc-V 64 pseudo instructions
* typo fixed
2022-05-28 21:22:11 +02:00
florian
6a00f9f403 * unified Risc-V 32 and 64 cpubase.pas 2022-05-28 21:15:53 +02:00
florian
09587d0c1b * standard Risc-V pseudo instructions for Risc-V 32 completed 2022-05-28 20:47:58 +02:00
florian
b29b81ae7b * pseudo instructions for flag handling 2022-05-28 20:25:28 +02:00
florian
1c7626715d * the stack pointer on Risc-V points always at the last used position, resolves #39739 2022-05-28 20:10:49 +02:00
Nikolay Nikolov
34ebeb15ed * pass the option to create shared, imported memory to the linker, in case the module is compiled with -CTwasmthreads
Note that this breaks running programs compiled with -CTwasmthreads with "wasmtime run --wasm-features threads", but
  there's not much we can do about that, since shared memory is required for threading, and wasmtime still doesn't
  support it.
2022-05-28 20:06:34 +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
Jonas Maebe
83604b709c ngtcon: fix def of emitted vmt in procedure of object typed constants
Fixes compilation of tests/test/tprocvar17 with the LLVM backend, and probably
some other tests as well
2022-05-28 11:21:39 +02:00
Nikolay Nikolov
7cd082ba5f + produce a target_features section when compiling with -CTwasmthreads 2022-05-28 04:04:02 +03:00
Nikolay Nikolov
1dd80d596d + added a 'producers' custom section to WebAssembly object modules, containing the FPC version 2022-05-28 03:33: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
bf41245549 * fixed compilation of ppudump 2022-05-28 01:26:17 +03:00
Nikolay Nikolov
1fce5121f3 + added the 'wasmthreads' target switch (enabled via -CTwasmthreads) 2022-05-28 01:18:55 +03:00
Nikolay Nikolov
ee89b7c9ec * fixed warning 2022-05-28 00:47:23 +03:00
florian
ca29df1aa9 * Risc-V: return with mret from interrupt handlers, resolves #39737 2022-05-27 23:33:20 +02:00
florian
b810afa193 * test also cmem unit intensively 2022-05-27 23:33:20 +02: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
dbba2d2746 + implemented popcnt via the popcnt instruction in WebAssembly 2022-05-27 23:23:27 +03:00
Nikolay Nikolov
c9ed14f87b + enable the 64-bit SAR instruction on the WebAssembly target 2022-05-27 22:56:05 +03:00
Nikolay Nikolov
b6aaa06f83 + enable the ROL/ROR instructions for WebAssembly 2022-05-27 22:46:32 +03:00
Michaël Van Canneyt
4765d885df * Export wasiAlloc, wasiFree 2022-05-27 19:16:52 +02:00
Pierre Muller
bb39ec1610 Avoid invalid typecast to tabstractvarsym 2022-05-27 12:32:53 +00:00
mattias
653303274f fcl-passrc: resolver: fixed error when accessing element of forward class 2022-05-27 11:45:24 +02:00
Sven/Sarah Barth
0c9b622a74 * fix compilation with DEBUG_NODE_XML defined 2022-05-27 07:36:50 +02:00
Sven/Sarah Barth
f73fc7d566 * fix #39736: ensure that the capturer object and any converted function reference interface are considered used
+ added test
2022-05-27 07:24:46 +02:00