Commit Graph

63500 Commits

Author SHA1 Message Date
Nikolay Nikolov
ac2f299d04 + declare __FPC_exception as a label, otherwise wasm-ld crashes 2021-09-18 01:47:28 +03:00
florian
8ad5362b17 * more warnings fixed 2021-09-17 23:44:55 +02:00
Nikolay Nikolov
87702b58c5 + emit a catch instruction in the try/end_try block, generated for
try..finally in native wasm exceptions mode
2021-09-18 00:26:00 +03:00
Yuriy Sydorov
a83f5749de * Reverted the accidentally committed debug code in 4a7a113a. 2021-09-17 23:54:41 +03:00
Nikolay Nikolov
288f79cb3b + declare the __FPC_exception tag, when compiling with native WebAssembly
exceptions
2021-09-17 23:46:38 +03:00
Nikolay Nikolov
d8665f8a51 * write the .globaltype directive and the imports in the beginning of the
assembly file, because that appears to be required by llvm-mc from git
2021-09-17 23:46:38 +03:00
florian
bee87583de * avoid warnings 2021-09-17 22:27:44 +02:00
FPK
3f26551c42 Compile with -Oodfa to get better warnings 2021-09-17 20:01:23 +00:00
Nikolay Nikolov
d36e239f45 + enabled the exception handling instructions in the llvm-mc command line 2021-09-17 21:20:14 +03:00
Nikolay Nikolov
619a27cbfc + insert try and end_try instructions in the try..finally code in native
WebAssembly exceptions mode
2021-09-17 21:09:17 +03:00
Nikolay Nikolov
45e53ddc16 * cloned the WASM no exceptions mode code generation for try..finally blocks
for the native WASM exceptions mode. Eventually, it is going to be changed
  to support exceptions fully, and it's going to evolve separately, so this
  code is only used as a starting point
2021-09-17 21:01:00 +03:00
Nikolay Nikolov
65a5b299c6 + introduced twasmraisenode.pass_1_no_exceptions 2021-09-17 16:53:35 +03:00
Nikolay Nikolov
6c213137a9 - cleaned up twasmtryexceptnode.pass_generate_code_no_exceptions 2021-09-17 16:21:43 +03:00
Nikolay Nikolov
c992566201 + introduced twasmtryexceptnode.pass_generate_code_no_exceptions,
.pass_generate_code_js_exceptions and .pass_generate_code_native_exceptions
2021-09-17 16:06:39 +03:00
Nikolay Nikolov
848098c63b * improvements to the handling of try..finally in WebAssembly no exceptions
mode - even though exceptions aren't supported in this mode, the finally
  section is now executed in case of exit, break or continue
2021-09-17 15:54:03 +03:00
Nikolay Nikolov
3601d61b81 + introduced twasmtryfinallynode.pass_generate_code_no_exceptions,
.pass_generate_code_js_exceptions and .pass_generate_code_native_exceptions
2021-09-17 13:37:28 +03:00
Nikolay Nikolov
2bcc8d65ff + introduced twasmexceptionstatehandler_nativeexceptions and
twasmexceptionstatehandler_jsexceptions
2021-09-17 13:12:34 +03:00
Nikolay Nikolov
3ca9475bde * twasmexceptionstatehandler renamed twasmexceptionstatehandler_noexceptions 2021-09-17 12:33:34 +03:00
Nikolay Nikolov
9526b939a2 + implemented thlcgwasm.g_unreachable, emits the 'unreachable' WebAssembly instruction 2021-09-17 03:41:45 +03:00
Nikolay Nikolov
4064694a5e + support writing the new tai_tagtype directive in the asm output 2021-09-17 02:15:56 +03:00
Nikolay Nikolov
3022f59ff4 + introduced ait_tagtype and tai_tagtype 2021-09-17 02:05:24 +03:00
Nikolay Nikolov
10d8332563 + added the new WebAssembly instructions, added by the exception handling proposal 2021-09-16 23:45:03 +03:00
J. Gareth "Curious Kit" Moreton
6b26fa0f9a Added correction to AllocRegBetween 2021-09-16 20:34:22 +00:00
Nikolay Nikolov
bdbdf26168 + added validation to ensure no more than one WebAssembly exception support
mode is enabled
+ set the NOEXCEPTIONS mode by default for the WebAssembly targets
2021-09-16 23:09:20 +03:00
Nikolay Nikolov
08b07122f8 + added usage info to the compiler help screen for the WebAssembly
target-specific exception handling modes
2021-09-16 22:23:18 +03:00
Nikolay Nikolov
cd244cbf7d * fixed compilation of ppudump 2021-09-16 21:48:28 +03:00
Nikolay Nikolov
3a242a17f4 * increased size of ttargetswitchinfo.define to fit the string added in my
previous commit
2021-09-16 21:44:05 +03:00
Nikolay Nikolov
eda6b105b7 + added target flags for the different WebAssembly exception modes that I'm
planning to implement
2021-09-16 21:41:54 +03:00
Nikolay Nikolov
3bf5b0c395 - avoid useless typecasts for accessing members in self in thlcgwasm.a_load_subsetref_regs_index 2021-09-16 15:15:39 +03:00
Nikolay Nikolov
4120825f50 + implemented thlcgwasm.a_load_regconst_subsetref_intern 2021-09-16 15:14:51 +03:00
Nikolay Nikolov
7af6e628c8 + implemented thlcgwasm.a_load_subsetref_regs_index 2021-09-16 14:30:29 +03:00
Nikolay Nikolov
c41516399b + implemented thlcgwasm.a_load_subsetref_stack 2021-09-16 12:10:43 +03:00
florian
81e83ffa67 * release temp 2021-09-15 23:16:53 +02:00
Yuriy Sydorov
4a7a113a30 * x86: Fixed attributes of the LEAVE instruction - it reads EBP.
This fixes crashes with -O3s in some cases due to an incorrect peephole
  optimization.
2021-09-15 22:30:00 +03:00
Florian Klämpfl
e121a753e1 * mark temps as deallocated
(cherry picked from commit 50452e5707b1d5f8590042ed55fc5f47bce33962)
2021-09-15 20:41:16 +02:00
Yuriy Sydorov
b2165570de * Fixed missing assignments with the strength reduction optimization. 2021-09-15 21:31:04 +03:00
Yuriy Sydorov
bd4c206472 * Fixed the strength reduction optimization for loops containing 'continue'.
The compiler now cycles properly with -O3 -OoSTRENGTH.
2021-09-15 18:07:12 +03:00
Yuriy Sydorov
b8befe3d1f * Fixed a typo in the condition, though it seems this code path is not used now. 2021-09-15 12:25:48 +03:00
Michaël Van Canneyt
3e621f2014 * Allow to specify address 2021-09-15 11:22:52 +02:00
Michaël Van Canneyt
711e659f5c * Allow to specify IP address 2021-09-15 11:18:50 +02:00
Michaël Van Canneyt
b08c12ff8a * Make some properties public 2021-09-15 11:18:50 +02:00
Yuriy Sydorov
abe3002b5b * Fixed lack of the calculation code for the strength reduction optimization. 2021-09-15 00:31:32 +03:00
Yuriy Sydorov
a7e234254f * x86: Do not replace inc/dec with add/sub 1 because this code path is
executed only for the C_Z,C_NZ,C_E,C_NE conditions, so inc/dec can be
  used.
2021-09-15 00:31:32 +03:00
florian
e2624fdaaa * fix test 2021-09-14 22:01:39 +02:00
mattias
5d571853ac pas2js: compile httpcompiler with fpc 3.2.2 2021-09-14 15:51:00 +03:00
mattias
ffc3e1780d pas2js: added SetPas2JSGetFileSrcAttrCallBack 2021-09-14 11:47:10 +03:00
mattias
6c4198fdf3 pas2js: fixed typeinfo procvar resulttype nil 2021-09-14 10:53:12 +03:00
Michaël Van Canneyt
59b49addc0 Revert "* Export SetPas2JSGetFileSrcAttrCallBack"
This reverts commit 0053cec880.
2021-09-14 09:16:48 +02:00
Michaël Van Canneyt
0053cec880 * Export SetPas2JSGetFileSrcAttrCallBack 2021-09-14 09:08:31 +02:00
florian
5065e4ba50 * fix code for ARM FPA, just in case ... 2021-09-13 22:55:44 +02:00