Commit Graph

25688 Commits

Author SHA1 Message Date
Jonas Maebe
15865e7602 Record variant discriminators: check types 2021-10-31 21:13:35 +01:00
florian
4f77cbbac4 + keep addresses of thread vars in registers if possible and likely an advantage 2021-10-31 19:25:01 +01:00
florian
5a617cd108 + fold real constants c1,c2 for v+c1+c2 or c1+(c2+v) (+ being either + or *) as well if fastmath is enabled 2021-10-31 17:38:08 +01:00
J. Gareth "Curious Kit" Moreton
284317d877 Fixed OptPass2Lea not honouring symbols 2021-10-31 15:44:00 +00:00
J. Gareth "Curious Kit" Moreton
42eb06f5c6 Fixed some range check problems 2021-10-31 15:44:00 +00:00
J. Gareth "Curious Kit" Moreton
b58fdc3e58 Improved ADD and SUB optimisations for LEA instructions 2021-10-31 15:44:00 +00:00
florian
ff3acfb8cd * cleanup of 2.7.0 defines 2021-10-31 13:20:28 +01:00
florian
e657aa6431 + write code and data size for Mach-O files if possible 2021-10-31 11:57:32 +01:00
florian
fb7cdbefb3 + some opcodes added 2021-10-30 20:21:59 +02:00
florian
95ad8f1694 * correctly read the region label in $region directives, resolves #39395 2021-10-28 21:13:01 +02:00
Jonas Maebe
3263e12a3e iphonesim: use ios_simulator_version_min
The linker expects ios_simulator_version_min rather than -iphoneos_version_min
when targeting the iOS simulator platform. Fixes compilation with Xcode 11
toolchains, which is more strict about this.
2021-10-27 20:53:42 +02:00
Jonas Maebe
334cf9c19d iphonesim target: requires proper alignment
Just like the native iOS targets
2021-10-27 20:53:39 +02:00
florian
4b157a1498 + print full file path if -vb is passed even if no line number is known, resolves #39419 2021-10-26 21:37:28 +02:00
florian
10fcae34a9 * improved TX86AsmOptimizer.OptPass1MOVXX 2021-10-24 18:38:23 +02:00
florian
4610980f2e * TX86AsmOptimizer.OptPass1MOVXX takes care of volatility 2021-10-23 23:40:09 +02:00
Nikolay Nikolov
7f1050464a + added 'else' tracking for the if..end_if blocks 2021-10-23 11:56:25 +03:00
Nikolay Nikolov
7bef4d827d * keep track of the block stack, when resolving labels and check whether the
blocks match (i.e. block..end_block, if..end_if, loop..end_loop, try..end_try)
2021-10-23 11:25:44 +03:00
J. Gareth "Curious Kit" Moreton
342803532d Bug fix to MovMov2Mov 6 optimisation exposed by 4012c3dbd4 (and miscellaneous code refactors) 2021-10-22 22:39:46 +00:00
florian
d0fdda6da7 + TDFABuilder.redodfainfo 2021-10-22 22:39:39 +02:00
Nikolay Nikolov
12a2c56461 - removed thlcgwasm.incblock, .decblock and br_blocks, as branching is now done
entirely with labels
2021-10-22 17:42:29 +03:00
Nikolay Nikolov
3094f75690 * WebAssembly code generation for 'case' nodes changed to use labels 2021-10-22 17:31:04 +03:00
Nikolay Nikolov
6fe647ee3d * moved the default procedure CurrRaiseLabel to the end of the procedure, not
at the exit label. This fixes problems when using units with finalization
  code that contain classes with class destructors in branchful WebAssembly
  exceptions mode.
2021-10-22 13:54:55 +03:00
Nikolay Nikolov
470e77a572 + added sanity check when resolving labels to ensure we don't get any jumps with
negative nesting depth
2021-10-22 13:54:55 +03:00
Nikolay Nikolov
5a0956d805 * use WebAssembly asm labels for the raise branch instruction in branchful
exceptions mode
2021-10-22 13:54:55 +03:00
Karoly Balogh
e018264ad9 internalerror if the section we're about to keep has no exesection assigned 2021-10-20 14:37:27 +02:00
Nikolay Nikolov
4e3a6aa5a8 * match the label to the wider block, if it is adjacent to both the brevious
and the next instruction
2021-10-20 14:35:52 +03:00
Nikolay Nikolov
c96e203780 * moved the 'end_block' WebAssembly instruction before the 'exit' label right
before the procedure finalization code. This fixes compilation errors in
  procedures with implicit finalization code (e.g. for ansistring local vars,
  etc).
2021-10-20 14:35:52 +03:00
Nikolay Nikolov
bb30958665 + wrap block nodes with exit in a_block..a_end_block instructions. This fixes
'exit' in inlined procedures on the WebAssembly target.
2021-10-20 14:35:51 +03:00
Nikolay Nikolov
703ae75ba6 * if a label cannot be associated with the previous block instruction, try
matching it with the next instruction
2021-10-20 14:35:51 +03:00
Nikolay Nikolov
9f077d4ac0 * leave unresolved branches in the asm output, when the compiler is compiled with -dEXTDEBUG 2021-10-20 14:35:51 +03:00
Nikolay Nikolov
1ce2fb8a4a * use WebAssembly asm labels for generating code for the 'exit' statement 2021-10-20 14:35:51 +03:00
Nikolay Nikolov
dc9090e67f * fixed some more warnings 2021-10-20 10:23:02 +03:00
Nikolay Nikolov
b3a9c36cbb * fixed some warnings 2021-10-20 10:03:14 +03:00
Nikolay Nikolov
0662a0bd44 + use WebAssembly asm labels for the code generation of 'break' statements as well 2021-10-20 09:59:54 +03:00
Nikolay Nikolov
01dc62b127 + introduced the use of asm labels for WebAssembly. Resolve them in
tcpuprocinfo.postprocess_code. Use them when generating code for the
  'continue' label jumps.
2021-10-20 09:39:44 +03:00
florian
7e73e0dd23 + support reading of .p2align with op code and/or max. bytes in the gas assembler reader
+ test
2021-10-18 22:12:27 +02:00
florian
08050086b9 * keep type when removing "1*", resolves #38840 2021-10-17 22:23:49 +02:00
florian
ee10850a57 * patch by Sergey Larin: Reducing and aligning the size of TAnsiRec, TUnicodeRec for CPU64, resolves #38018:
For CPU64, the size of record TAnsiRec and TUnicodeRec is 16 bytes instead of 24.
    Which is very good also because of the alignment. when allocating memory, the address
    of the first character of the string will be aligned on the 16-byte boundary.
    At the same time, the useless Dummy field, which is needed in CPU64 for exactly alignment, has been removed.
    For CPU32 (and CPU16), the record size has not changed, so procedures such as
    fpc_AnsiStr_Decr_Ref, implemented in assembler (see i386, arm), remained working correctly.
  * tests adapted
2021-10-17 11:13:29 +02:00
florian
ea6529ff63 * manually merged merge request 69 by J. Gareth "Kit" Moreton:
x86: CMP/MOV refactoring and expansion
      This merge request refactors the SwapMovCmp routine, and calls to it, to be more self-contained,
      having the preliminary checks built-in to ensure that moving the MOV instruction is
      actually a sound idea, while also making it more general-purpose so it can handle instructions
      that are not MOV operations. This feature is primarily for future expansion,
      but also cleans up the code for the x86 peephole optimizer.
2021-10-17 10:22:30 +02:00
florian
4012c3dbd4 * merge request 75 by J. Gareth "Kit" Moreton manually applied:
This merge request makes a number of improvements to the DeepMOVOpt method and supporting functions:

      * ReplaceRegisterInInstruction now replaces registers in references that are written to
        (since the registers themselves won't change)
      * RegModifiedByInstruction will no longer return True for a register that appears in a reference
        that's written to (for the same reason as above) - special operations like MOVSS
        (the 0-operand version) aren't affected.
      * DeepMOVOpt returning True will now always set the Result of OptPass1MOV to True even though p
        wasn't directly modified, since this often caused missed optimisations.
      * Some of the speed-ups in the patch from #32916 have also been applied in order to make
        the general DeepMOVOpt run faster, notably it tries to avoid calling UpdateUsedRegs where possible.
2021-10-17 09:50:47 +02:00
J. Gareth "Curious Kit" Moreton
fd28cc0db0 Better handling of zeroing upper parts of registers
Better handling of zeroing upper parts of registers
2021-10-16 14:42:19 +02:00
J. Gareth "Curious Kit" Moreton
674ed4069a Expanded MM block move to include YMM registers under AVX 2021-10-16 14:17:41 +02:00
florian
d55b2c2a35 + extend assembler optimization MovxMov2Mov to MovxOp2Op 2021-10-15 23:12:59 +02:00
Nikolay Nikolov
0da5d57c1e * replaced the 'if br end_if' sequence with the 'br_if' instruction, when
generating WebAssembly code for try..finally blocks (in all exception modes)
2021-10-14 14:19:13 +03:00
Nikolay Nikolov
dcae87bd52 + support cdecl and stdcall on the WebAssembly target. They are essentially the
same, the only difference is that cdecl creates an unmangled alias
2021-10-14 12:29:59 +03:00
Nikolay Nikolov
b91fc3a0d3 * fixed passing of singleton record parameters, containing a float in WebAssembly 2021-10-14 10:53:55 +03:00
Nikolay Nikolov
df92d88f39 + added support for the handling of singleton record and array types in
defToWasmBasic
2021-10-14 10:53:55 +03:00
Nikolay Nikolov
3511b80972 * fixed formatting in defToWasmBasic 2021-10-14 10:53:55 +03:00
Nikolay Nikolov
ee387f7c66 * C ABI fixes for the passing of records in WebAssembly 2021-10-14 10:53:55 +03:00
Nikolay Nikolov
236e10d03a + pass 64-bit structures by address in WebAssembly for compatibility with LLVM's C ABI 2021-10-14 10:53:55 +03:00
florian
321764bdd9 * fix warnings with -dDEBUG_NODE_XML, resolves #38222 2021-10-13 23:08:32 +02:00
florian
6cb24a3929 * itcpugas unit for Z80 providing gas_regname to fix compilation with -dDEBUG_NODE_XML 2021-10-13 23:08:32 +02:00
florian
00d4a6889d * add no internal flag when folding constants in taddnode.simplify, resolves #39308 2021-10-12 22:59:45 +02:00
florian
ca9384fd6c * patch by Dean Mustakino to avoid generation of debug info for generics, resolves #38827
+ test
2021-10-11 18:45:41 +02:00
florian
07413be8b5 + being able to define change information for xmm0
* corrected change information for SHA256RNDS2
2021-10-10 23:07:23 +02:00
J. Gareth "Curious Kit" Moreton
a925522ead xor optimisation now doesn't check to see if the REX prefix will actually be removed, as it's beneficial for speed reasons to only use the 32-bit register when zeroing the whole thing 2021-10-10 16:17:43 +00:00
florian
2c180cf101 * by default, DEBUG_AOPTCPU is only enabled if the compiler is compiled with -dEXTDEBUG 2021-10-10 15:35:38 +02:00
J. Gareth "Curious Kit" Moreton
d502bccc1b A pair of inlines 2021-10-10 09:19:57 +00:00
florian
cc3cbbb7b9 * fix x86 compilation after my last commit 2021-10-10 10:21:21 +02:00
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
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
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
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
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
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
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
Nikolay Nikolov
9a85ac204c + fixed compilation of ppudump 2021-10-04 00:29:27 +03:00
florian
494dac5db5 + x86: MovOp2Op optimization 2021-10-03 23:17:27 +02:00
Nikolay Nikolov
1011c31a80 + increase string type to avoid const string truncation 2021-10-04 00:15:27 +03:00
Nikolay Nikolov
2577180b93 + introduced WebAssembly branchful exceptions 2021-10-04 00:10:31 +03:00
Jonas Maebe
ab01b0ebd7 Typed constants: no internalerror on failure
Don't check whether the expression queue is empty in the destructor in case
there was an error. Also improved error messages (constant expression instead
of variable expression expected).

Resolves #39393
2021-10-03 21:46:23 +02:00
J. Gareth "Curious Kit" Moreton
190c77e863 Fixed bug where hp1 object was used after being freed 2021-10-03 19:45:22 +01:00
florian
2e8c99947a * define DEBUG_AOPTCPU if EXTDEBUG is used 2021-10-03 18:40:20 +02:00
Nikolay Nikolov
890b899842 + support the <= and >= operators for smallsets on the Z80 2021-10-03 18:33:00 +03:00
Nikolay Nikolov
b00c0e44a5 + support equality comparison of smallsets on the Z80 2021-10-03 18:16:45 +03:00
Jonas Maebe
3fb0fab410 Fix bitpacking 62/63 bit fields on 64 bit targets
As reported on the lazarus forum:
* https://forum.lazarus.freepascal.org/index.php?topic=56341.new
* https://forum.lazarus.freepascal.org/index.php/topic,56339.msg418608/topicseen.html

Also optimized nextpowerof2 in the compiler
2021-10-03 14:00:50 +02:00
Nikolay Nikolov
41db71c21c + implemented the <= operator for smallsets for WebAssembly 2021-10-03 04:37:13 +03:00
Nikolay Nikolov
5adec3ca98 + workaround for WebAssembly treating the stack parameter of the store and load
instructions as unsigned. This caused an 'out of bounds memory access' trap
  when accessing arrays with negative offset index, e.g. in test/cg/tvec.pp
2021-10-03 03:16:34 +03:00
Nikolay Nikolov
0a383d8c0f * fixed WebAssembly method pointer assignment 2021-10-03 02:27:19 +03:00
Nikolay Nikolov
6f88919f37 - don't set casmdata in wasm32/aasmcpu.pas, so that the aasmdef unit can override it 2021-10-03 00:59:11 +03:00
Nikolay Nikolov
c1eeb8beda + use the aasmdef unit in wasm32/cpunode.pas 2021-10-03 00:49:53 +03:00
Nikolay Nikolov
020a58b075 + added system_wasm32_embedded to systems_embedded 2021-10-02 23:14:24 +03:00
Nikolay Nikolov
c450b63f1c + enabled compilation of the fpintres unit for the WASI target and enabled tf_has_winlike_resources for the target 2021-10-02 22:43:05 +03:00
J. Gareth "Kit" Moreton
4b39f7dea0 x86: Missed logic with CMP and MOV optimisations 2021-10-02 19:32:44 +00:00
Nikolay Nikolov
cc2fa67dfa * fixed OS_S8 to OS_16 conversion for WebAssembly. This fixes test/cg/tcnvint6 2021-10-02 22:10:34 +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
026d23632a + added the memory.copy and memory.fill WebAssembly instructions 2021-10-02 19:35:26 +03:00
florian
cc5ee6b868 + comments 2021-10-02 16:24:47 +02:00
florian
39164ad732 * cleanup 2021-10-02 16:15:19 +02:00
florian
c1d8e32eae + Aarch64: Ldr<Postfix>Mov2Ldr<Postfix> optimization 2021-10-02 16:07:00 +02:00
florian
b5c7997c88 + Aarch64: AndCmpB.E/NE2Tbnz/Tbz optimization 2021-10-02 15:46:37 +02:00
florian
177b38dfe9 * modified (cosmetics) patch by Rika: replace DJB2 with MurmurHash3, resolves #39377 2021-10-01 23:06:31 +02:00
Nikolay Nikolov
d2726c2406 * fixed WebAssembly code generation for not(cbool64) 2021-10-01 05:17:12 +03:00
Nikolay Nikolov
4fc763ac50 * fixed WebAssembly cbool support for OP_NOT 2021-10-01 04:54:17 +03:00
Nikolay Nikolov
baf5ff4e05 * another WebAssembly cbool fix in twasmtypeconvnode.second_int_to_bool 2021-10-01 04:40:50 +03:00
Nikolay Nikolov
968e23546c * fixed second_int_to_bool for cbool types for WebAssembly 2021-10-01 04:20:02 +03:00
Nikolay Nikolov
188a21bbfd * fixed 'not(boolean64)' for WebAssembly 2021-10-01 03:01:55 +03:00
Nikolay Nikolov
c6a549eb48 * int64/boolean64 fix in twasmtypeconvnode.second_int_to_bool 2021-10-01 02:57:04 +03:00
Nikolay Nikolov
2e5b895d70 * fixed WebAssembly code generation for 'if boolean64 then ... else ...' 2021-10-01 02:47:08 +03:00
Nikolay Nikolov
4d571a1928 * fixed code generation for 'boolean64 and/or boolean64' for WebAssembly 2021-10-01 02:43:55 +03:00
florian
abd494624b * properly search in GetMMRegisterBetween and GetIntRegisterBetween for usable
volatile registers (low(<set>) .. high(<set) just searched all possible elements
    and not only the included ones)
2021-09-29 22:30:51 +02:00
J. Gareth "Kit" Moreton
1f19b11398 x86_64: Fix to tw8573 overflow bug under -Cg option 2021-09-29 18:32:31 +00:00
flyingsheep
6c6cb13a5e * Fix for issue #39379 by bart broersma 2021-09-29 17:21:57 +02:00
Nikolay Nikolov
91d8009b53 + implemented round(real) for WebAssembly via the fXX.nearest and i64.trunc_fXX_s instructions 2021-09-29 05:27:27 +03:00
Nikolay Nikolov
835bc62e2a + implemented trunc(real) for WebAssembly via the i64.trunc_f32_s and i64.trunc_f64_s instructions 2021-09-29 05:07:43 +03:00
Nikolay Nikolov
f6b4a54f7d * fixed output of 32-bit floating point constants in the llvm-mc asm output 2021-09-29 04:57:19 +03:00
Nikolay Nikolov
d84a7d1bde + implemented int(real) for WebAssembly via the f32.trunc and f64.trunc instructions 2021-09-29 04:19:10 +03:00
Nikolay Nikolov
8822be8a1f + implemented abs(real) for WebAssembly via the f32.abs and f64.abs instructions 2021-09-29 04:04:03 +03:00
Nikolay Nikolov
f42817d1a2 * fixed opcode generation for the f32.const in the WebAssembly internal asm 2021-09-29 03:56:13 +03:00
Nikolay Nikolov
95243ed6ed + implemented sqrt via the f32.sqrt and f64.sqrt instructions 2021-09-29 03:48:31 +03:00
Nikolay Nikolov
6e6c946e0f * the fpc_Catches result test code was inverted 2021-09-29 00:17:17 +03:00
florian
7ce1a7c6a0 * x86_64-linux doesn't need .data.rel.ro either 2021-09-28 23:13:35 +02:00
Nikolay Nikolov
99dbbcadcd + generate functype directives for all functions in all used units, regardless
of whether they have paraloc info created. This fixes linking of WebAssembly
  programs that declare their own classes, because that causes the compiler to
  generate a VMT, containing references to virtual methods, and these don't
  necessarily have paraloc info (if they're not called from within the program)
2021-09-29 00:04:23 +03:00
Nikolay Nikolov
6e7f0744ca + implemented the 'on' node for WebAssembly in native exceptions mode 2021-09-28 23:55:10 +03:00
Nikolay Nikolov
0e647a073e + override the 'on' node for WebAssembly 2021-09-28 21:23:49 +03:00
Nikolay Nikolov
ef738f01cf * fixed warning 2021-09-28 20:39:47 +03:00
Nikolay Nikolov
f2abce7ea5 + initial implementation of try..except..end in wasm native exceptions mode.
The 'on' statements are not implemented yet.
2021-09-28 20:23:27 +03:00
Nikolay Nikolov
99e449eaa1 * decblock moved after end_try, instead of after catch 2021-09-28 04:11:16 +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
c9fd115ec5 * fixes to the try..finally code generation in wasm native exceptions mode 2021-09-28 03:29:45 +03:00
Nikolay Nikolov
21fd8cd5d3 * updated ppudump with the new asm symbol types and binding types 2021-09-28 03:01:09 +03:00