florian
a4672fbd1c
o based on a patch by Rika, resolves #39401 :
...
* use Base64 (62=_, 63=$) encoded FNV hash (instead of CR-32) to shorted identifiers
* renamed fpccrc to fpchash
+ test
2021-10-10 10:09:22 +02:00
Nikolay Nikolov
bae50d80d2
* preopen fd names and current dir changed to use ansistring, as well as the
...
parameters and result of ConvertToFdRelativePath. This will allow easier
implementation of ChDir.
2021-10-10 09:11:19 +03:00
florian
bff09e8e9e
+ CPU units: check for SHA support
2021-10-09 16:23:11 +02:00
florian
6c7e6191f6
+ support of SHA extension in the internal assembler
2021-10-09 15:44:46 +02:00
florian
8f68988aef
* another location to use source register as second register in VCVTSD2SS and VCVTSS2SD
...
to break dependency chains, hopefully final fix for #39360
2021-10-09 14:24:14 +02:00
florian
b4bf371b34
* generate VMOVAPS for (V)Cvtss2CvtSd(V)Cvtsd2ss optimization, resolves #39360
2021-10-08 22:59:29 +02:00
Nikolay Nikolov
344da9597f
+ added the current WebAssembly exceptions mode to the .ppu module flags and
...
perform a check to ensure all units are compiled in the same exceptions mode
as the main program
2021-10-08 23:50:28 +03:00
Yuriy Sydorov
7388735b11
* Strength reduction optimization: - Use a temp for complex loop start values to prevent double evaluation.
...
- For slow CPUs perform the optimization for all sizes of array elements.
2021-10-08 18:04:03 +03:00
Yuriy Sydorov
6bf4c7a68d
* Optimized evaluation of the condition.
2021-10-08 16:51:42 +03:00
Pierre Muller
b93998c17c
Disable utils for wasi target, because paszlib cannot be compiled due to use of goto labels
2021-10-08 08:41:14 +00:00
florian
4752230c8f
* use source register as second register in VCVTSD2SS and VCVTSS2SD, this should break
...
dependency chains better and resolves partially #39360
2021-10-07 23:16:39 +02:00
florian
ec40db3da7
+ (V)Cvtss2CvtSd(V)Cvtsd2ss2Nop optimization, resolves #39360
2021-10-06 21:57:24 +02:00
florian
d5867793f6
* partially applied patch by J. Gareth "Kit" Moreton to inline parts of cclasses, resolves #39344
2021-10-06 21:24:18 +02:00
Bi0T1N
e77bf0f3bd
Add two more templates to show the possibilities
2021-10-06 17:26:28 +00:00
Bi0T1N
25af28de1e
Add initial Description templates
...
this adds a description template for issues as well as for
merge requests that target the compiler
2021-10-06 17:26:28 +00:00
Nikolay Nikolov
d45915b6ba
* preopened dirs structure in the system unit modified to be a pointer to an
...
array of records
2021-10-06 07:44:04 +03:00
Nikolay Nikolov
e078408dcf
+ implemented SysUtils.GetEnvironmentVariable, GetEnvironmentVariableCount and
...
GetEnvironmentString for WASI
2021-10-06 06:12:58 +03:00
Nikolay Nikolov
7533496505
+ implemented SysUtils.Sleep for WASI
2021-10-06 05:39:11 +03:00
Nikolay Nikolov
d134fc1ddf
+ implemented SysUtils.GetTickCount64 for WASI
2021-10-06 04:46:44 +03:00
florian
91cf1774dd
* replace MT random generator by Xoshiro128**, resolves #38237
2021-10-05 22:20:22 +02:00
Nikolay Nikolov
e19fcd2b8b
+ implemented GetMsCount in the DOS unit for WASI
2021-10-05 20:49:32 +03:00
Nikolay Nikolov
074ce9c50f
+ added call to g_maybe_checkforexceptions after generating call to fpc_iocheck
2021-10-05 18:02:11 +03:00
Nikolay Nikolov
3c58f26e83
* thlcgwasm.g_checkexceptions renamed .g_maybe_checkforexceptions, added also as
...
an empty virtual method in thlcgobj and modified the WebAssembly
implementation, so that it can be called from any exceptions mode (so it
emits no code in exception modes that don't require it, instead of generating
an internal error). This will allow .g_maybe_checkforexceptions to be called
from the generic parts of the code generator, after calls to systemprocs that
could raise an exceptions.
2021-10-05 17:54:35 +03:00
Nikolay Nikolov
387c80cc57
+ default exception handling in WebAssembly native exceptions mode
2021-10-05 08:02:39 +03:00
Nikolay Nikolov
fab4ca449b
* twasmexceptionstatehandler_nativeexceptions.handle_nested_exception and
...
twasmexceptionstatehandler_bfexceptions.handle_nested_exception should not be
called, so now they cause an internal error
2021-10-05 07:54:57 +03:00
Nikolay Nikolov
04a41fa5b0
- removed duplicated assignment
2021-10-05 07:43:47 +03:00
Nikolay Nikolov
99ab6bd56d
+ proper exception object cleanup when using break, continue or exit in try
...
except blocks in WebAssembly native exceptions mode
2021-10-05 07:41:42 +03:00
Nikolay Nikolov
ddbdc529b1
+ proper exception cleanup for try except blocks that use exit, break or
...
continue in WebAssembly branchful exceptions mode
2021-10-05 07:19:24 +03:00
Nikolay Nikolov
023f08d54b
+ exception cleanup when break, continue or exit is used inside a
...
try .. except 'on' block, in WebAssembly native exceptions mode
2021-10-05 06:45:31 +03:00
Nikolay Nikolov
cf7ad98dbf
+ support exception object cleanup, when 'exit', 'break' or 'continue' is used
...
in the except 'on' statements, in branchful WebAssembly exceptions mode
2021-10-05 06:25:32 +03:00
Nikolay Nikolov
7110d1e48e
* use 'br_if' instead of 'if br end_if' sequence in the code, generated by
...
thlcgwasm.g_checkexceptions
2021-10-05 05:29:10 +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
a01a602140
- removed commented out code from the WASI startup code
2021-10-05 03:48:47 +03:00
Nikolay Nikolov
f7b1ec2435
+ call g_checkexceptions after calls to fpc_reraise and fpc_raise_nested in
...
branchful exceptions mode
2021-10-05 03:38:33 +03:00
Nikolay Nikolov
464b3ebbed
+ implemented the 'on' node code generation (try except 'on' ...) for the
...
branchful exceptions mode
2021-10-05 03:25:03 +03:00
Nikolay Nikolov
a5dcd1c44d
+ initial implementation of try..except in branchful exceptions mode
2021-10-05 03:14:58 +03:00
Nikolay Nikolov
7ce19c1ad7
+ implemented try..finally in branchful exceptions mode
2021-10-05 02:47:49 +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
5be1bfeeca
+ added comment that states that raiseBr is only used in branchful exceptions mode
2021-10-05 01:11:31 +03:00
Nikolay Nikolov
d02921d66b
+ introduced raiseBr, similar to exitBr, but will point to the current
...
innermost exception handler, if there is such a handler in the current
procedure, otherwise it will be the same as exitBr.
2021-10-05 01:07:37 +03:00
Nikolay Nikolov
6599f1d898
- don't generate any WebAssembly native exception handling instructions, nor
...
relocations, when compiling in branchful exceptions mode. This produces a
currently not working, but accepted by wasmtime binary (otherwise, it
complains it doesn't support exceptions and refuses to try to run it).
2021-10-05 01:01:24 +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
Pierre Muller
7778d20003
Avoid range check error in TCpuAsmOptimizer.OptPostAnd method
2021-10-04 21:08:24 +00:00
florian
1e136b0cc7
* bail out early in MatchInstruction
2021-10-04 22:18:53 +02:00
florian
01a449c807
+ debug msg added
2021-10-04 22:11:08 +02:00
Jonas Maebe
c745ae4836
AArch64 popt: don't replace registers with X/WZR
...
Most arithmetic/logica instructions don't support X/WZR as operand (since
you should use movk with the calculated constant in that case)
Resolves #39372
2021-10-04 20:58:05 +02:00
Yuriy Sydorov
e9d318e7e2
* x86: Fixed update of used registers in the CMOV optimizations.
...
This fixes a bug reported by Martin Frb in fpc-devel which is triggered
by the recently provided test code in FPC 3.2.2 x86_64, but is hidden
in trunk by other pipeline peephole optimizations.
2021-10-04 18:10:34 +03:00
Nikolay Nikolov
3989a01968
- removed msg2inc. Stupid git added it without my consent.
2021-10-04 00:34:18 +03:00