Commit Graph

28004 Commits

Author SHA1 Message Date
florian
9409ec6341 * workaround unsupported -march=...+pauth for some assembler/clang versions 2024-04-21 11:04:42 +02:00
florian
902c93f3c3 * do not limit the number of interfaces per class, resolves #40268 2024-04-20 22:05:18 +02:00
J. Gareth "Curious Kit" Moreton
9ee1821622 * arm / a64: Extended the AND; CMP -> ANDS family of optimisations to catch BIC as well as AND 2024-04-20 12:55:47 +00:00
florian
e412f6be55 + in on an empty set is always false, resolves #40745 2024-04-19 23:43:35 +02:00
florian
2f9ed0576e * optimize x </>= length(...) also if the operands are swapped 2024-04-18 23:07:40 +02:00
florian
e130557d9f * optimize x < length(arr) and x >= length(arr) as proposed in #40292 2024-04-17 23:29:13 +02:00
Pierre Muller
a4240a0c62 Fix compilation of i8086/n8086add.pas unit after introduction of get_int_value function 2024-04-17 07:52:05 +00:00
florian
f29ff58ab9 + get_int_value 2024-04-16 23:11:16 +02:00
florian
48eeaf00a4 + fold also divisons involving pointer constants (those nodes are internally generated only) 2024-04-15 23:02:28 +02:00
florian
2e9556f2eb + fold also constant pointer operations on nil nodes 2024-04-15 22:52:32 +02:00
florian
b3c1f294ba + propagate also widechar/pointer constants 2024-04-14 10:34:37 +02:00
florian
0aa851b7f7 * run constant propagation multiple times if needed and if slow optimizations are turned on 2024-04-14 10:00:20 +02:00
florian
5c46b5116d + also fold nil nodes when used as pointer constants 2024-04-13 22:52:46 +02:00
florian
1222456c13 * allow [] for constant set constraints, resolves #37020 2024-04-13 22:28:54 +02:00
florian
13fc4075f5 + propagate pointer constants 2024-04-12 21:40:04 +02:00
Sven/Sarah Barth
b0d61558e3 * fix #40725: pass along whole array constructor to the Insert() so that it's converted with the correct checks
+ added test
2024-04-12 17:34:58 +02:00
Sven/Sarah Barth
e76c5d96d8 * Fix #40716: only add helpers if the type doesn't belong to the current object/class/record hierarchy
+ added test
2024-04-12 17:34:58 +02:00
Sven/Sarah Barth
7a1ef994b4 * fix #40721: correctly set up the generic defs when parsing fields, especially important when dealing with anonymous fields
+ added tests
2024-04-12 17:34:58 +02:00
Sven/Sarah Barth
0e9efd07ef * extend read_anon_type() so that it can take a genericdef as well 2024-04-12 17:34:58 +02:00
Sven/Sarah Barth
eaf24269bc * check that the corresponding genericdef of the adjusted def is indeed valid 2024-04-12 17:34:58 +02:00
Sven/Sarah Barth
550397b982 * fix #40708: when creating the sub-arraydefs for comma separated arrays, ensure that the new sub array also has the generic related information set up correctly
+ added test
2024-04-12 17:34:58 +02:00
J. Gareth "Curious Kit" Moreton
3cae3e7e48 * x86: Registers are now allocated properly during a FuncMov2Func
optimisation
2024-04-09 20:51:24 +00:00
J. Gareth "Curious Kit" Moreton
18eec3055e * x86: More accurate register tracking in CheckJumpMovTransferOpt 2024-04-09 20:51:24 +00:00
florian
fd68d3bfbb * ensure that left and right have a result type set in tx86addnode.pass_1, resolves #40727 2024-04-08 22:53:34 +02:00
florian
80750f7591 * second_abs: don't supply a separate 64 bit code path for high level cpu targets 2024-04-07 22:49:18 +02:00
Nikolay Nikolov
2e65a5d458 + introduced cgbase.topcg2str and topcmp2str for converting TOpCg and TOpCmp to strings (useful for debug logging, etc) 2024-04-07 22:10:41 +03:00
florian
139f2dfe84 * fix internalerror 200502052 with certain min/max optimizations on x86-64, resolves #40730 2024-04-06 23:31:37 +02:00
Pierre Muller
f56587bddd Use correct check for unsigned size in a_op64_{const/reg}_reg_reg_checkoverflow methods 2024-04-03 23:41:50 +02:00
Pierre Muller
8511b0fc7b Increase default stack size to 8Mb for i386 and sparc solaris systems 2024-04-03 23:17:55 +02:00
florian
8cdb3deebd * another fix for min/max intrinsics on x86_64 for non constant/reference/register locations, resolves #40724 2024-04-03 22:03:30 +02:00
Pierre Muller
8fa80295d0 Avoid running cleanppulogs and ppulogs rules in parallel 2024-04-03 14:56:51 +00:00
florian
e7716dc05f + avr: overflow checking for abs, together with the other recent abs-related commits, resolves #40694 2024-04-02 19:01:42 +02:00
florian
b00e9543a7 * sparc: overflow support for 64 bit operations 2024-04-02 16:41:38 +02:00
florian
3b8fcfc6eb * fix min/max intrinsics on x86_64 for non constant/reference/register locations, resolves #40721 2024-04-01 23:25:24 +02:00
Michael Ring
7c3ab69c50 Fixed missing section for Raspberry Pi Pico 2024-04-01 21:00:12 +00:00
florian
e88248d453 + comment to explain last commit 2024-03-31 22:33:22 +02:00
florian
bf1c674672 * don't remove align directives before case jump tables (they have the type alt_addr) 2024-03-31 22:15:08 +02:00
florian
a90691435b + abs(long/int64): overflow checking for xtensa implemented 2024-03-30 20:29:48 +01:00
florian
240739e71d * compilation on 64 bit targets fixed 2024-03-29 21:44:23 +01:00
florian
a8d496ade7 * i386 uses generic x86 abs(long/int64) code now 2024-03-29 20:54:52 +01:00
florian
13e7f947ea * all CPUs use now internal abs(<int64>) so overflow checking is possible
+ added overflow checking to generic abs(<longint>)
2024-03-29 20:30:57 +01:00
florian
c87213085f * overflow checking for generic abs(<int64>)
* fix overflow checking on arm for 64 bit signed numbers
  * arm uses generic abs(<int64>)
2024-03-29 20:06:23 +01:00
florian
8132ccd42b + generic implementation of abs(<int64>) 2024-03-29 15:30:18 +01:00
florian
56d84c9283 * compilation fixed 2024-03-28 18:31:38 +01:00
florian
0efd3afb8c + arm: internal abs(<int64>)
+ arm: overflow checking for abs(...)
2024-03-28 15:56:52 +01:00
florian
f0cc07fe68 + 8086: overflow checking for abs(<long/int64>) 2024-03-28 15:07:47 +01:00
florian
2641f65bb7 * compilation with -dEXTDEBUG fixed 2024-03-28 15:07:35 +01:00
florian
fea8050457 * fix i386 building after fb3c4ff75b 2024-03-27 00:04:46 +01:00
florian
15398549a4 * fix simplication of max(double,double) with both values being constants 2024-03-26 23:55:47 +01:00
florian
fb3c4ff75b * avoid CMPs with constants outside the range of signed 32 bit values 2024-03-26 23:53:46 +01:00
Michaël Van Canneyt
564597a573 * Fix access violation: module can be reset while loading dependent units. Fixes issue #40705 2024-03-26 16:06:27 +01:00
J. Gareth "Curious Kit" Moreton
ee1916e919 * i8086: Local variables unused in "second_AndOrXorShiftRot_assign" on i8086 are now not defined on this platform 2024-03-26 14:18:31 +00:00
J. Gareth "Curious Kit" Moreton
11b341cc97 * x86: Added new OptPass1CMOVcc peephole optimisation routine to dust up min/max code 2024-03-26 14:18:31 +00:00
J. Gareth "Curious Kit" Moreton
c79361c010 * Min/max intrinsics now simplify deterministic results 2024-03-26 14:18:31 +00:00
J. Gareth "Curious Kit" Moreton
e4a0ce2fb5 * x86: Min/max intrinsic support 2024-03-26 14:18:31 +00:00
J. Gareth "Curious Kit" Moreton
77c86cafd0 * a64: Fixed bug where unsigned min/max inlines used a signed comparison 2024-03-26 14:18:31 +00:00
J. Gareth "Curious Kit" Moreton
81b7b80749 * Added support for 64-bit min/max intrinsics 2024-03-26 14:18:31 +00:00
florian
8971103a00 * use bit_set_reg_reg also to clear single bits in thlcgobj.a_load_regconst_subsetref_intern 2024-03-26 14:46:01 +01:00
J. Gareth "Curious Kit" Moreton
4378319f87 * Added missing "override" directive for XML node dump routine on TDerefNode 2024-03-26 13:25:46 +00:00
Pierre Muller
afea558fbe Add -32/-64 for sparc GNU assembler calls 2024-03-25 23:48:14 +01:00
Pierre Muller
c68ddc5360 Add $EMUL also for sparc CPU GNU linker call on solaris OS 2024-03-25 23:48:14 +01:00
J. Gareth "Curious Kit" Moreton
948766a37a * x86: New Op/TEST optimisation that rearranges register usage for the most efficient execution 2024-03-25 22:25:29 +00:00
florian
7c609ee7c4 * proper fix for 9056ab8025 2024-03-25 22:33:30 +01:00
Pierre Muller
9056ab8025 Fix generation of i8086 CPU code, as BTR/BTS instructions require at least 386 CPU 2024-03-25 14:29:08 +00:00
florian
ac150e58c8 * thlcgobj.a_load_regconst_subsetref_intern uses a_bit_set_reg_reg if applicable 2024-03-25 00:01:24 +01:00
florian
12176d3683 * avoid to generate bts/r with memory operand
+ thlcgx86.a_bit_set_reg_reg
2024-03-24 23:03:33 +01:00
J. Gareth "Curious Kit" Moreton
2b7df4237b * nf_pass1_done, nf_error, nf_processing and nf_do_not_execute
have been moved to a new "transientflags" node field that
    isn't stored in PPU files
2024-03-24 18:14:49 +00:00
ccrause
dd858f37aa Ensure register to be eliminated is de-allocated before applying optimization LdsMov2Lds. 2024-03-24 13:54:31 +00:00
J. Gareth "Curious Kit" Moreton
99851f22f5 * a64: New B -> RET peephole optimisation 2024-03-24 13:31:52 +00:00
florian
20f9b82543 * AArch64: overflow checking for abs
* tabs adapted: also abs(longint) must overflow check on 64 bit platforms
2024-03-24 12:47:16 +01:00
florian
1fccfd3ee1 * AArch64: avoid false overflow error in case of -2^63+0 2024-03-24 12:36:02 +01:00
florian
b7322ae4c3 * write correct type name in error message 2024-03-23 22:24:55 +01:00
florian
4100f75056 + optimize s:=s+[e] into include(s,e) 2024-03-23 21:02:15 +01:00
florian
06fc6f1e6b * use destination location instead of a temp when constructing sets, resolves #40384 2024-03-22 21:50:42 +01:00
J. Gareth "Curious Kit" Moreton
e1297e0859 * Adjustment to "(v>=x) and (v<=y)" so it also optimises its inverse: "(v<x) or (v>y)" 2024-03-20 21:01:35 +00:00
Pierre Muller
36b511f057 FFix compilation of compiler with -dTest_Double_checksum 2024-03-20 17:30:12 +00:00
Michaël Van Canneyt
c52794f943 * Fix build of nativent 2024-03-19 10:27:30 +01:00
J. Gareth "Curious Kit" Moreton
f77b9fa4ef * arm/a64: Fixed bug where shifter operand was not preserved in AND/CMP -> TST optimisation 2024-03-18 21:21:54 +00:00
florian
316e127948 * overflow checking for ti386inlinenode.second_abs_long 2024-03-17 10:24:20 +01:00
florian
c3b8b51cb5 * more overflow checking for abs(...) 2024-03-16 21:54:12 +01:00
J. Gareth "Curious Kit" Moreton
a907eb49c9 * a64: Several secondary peephole optimizations that clean up CSEL instructions 2024-03-15 18:08:37 +00:00
J. Gareth "Curious Kit" Moreton
ef1cb852a8 * a64: New CSEL block optimisations ported over from x86 CMOV block optimisations 2024-03-15 18:08:37 +00:00
florian
2a46596edd * overflow check abs(...) for x86 2024-03-14 23:14:47 +01:00
Pierre Muller
f88622a799 Be sure not to consume semicolon after _USES twice 2024-03-11 11:07:02 +00:00
J. Gareth "Curious Kit" Moreton
755d221230 * x86: Additional optimisation in OptPass2MOV to help with sub-optimal MOV/CMP/MOV triplets (and a minor refactor). 2024-03-10 21:09:59 +00:00
J. Gareth "Curious Kit" Moreton
f4e955d04f * x86: Improvement to CMOVcc/Jcc optimisation that attempts to remove temporary registers storing constants 2024-03-10 21:09:59 +00:00
J. Gareth "Curious Kit" Moreton
a7fe49f38f * x86: CMOVcc/Jcc pairs are now changed to MOV/Jcc if the register is not used if the jump doesn't branch 2024-03-10 21:09:59 +00:00
florian
e35403c3b8 * optimize additions of empty sets away if possible, part of #40384 2024-03-10 10:47:24 +01:00
florian
594d4cc4f9 * transform -1-x into not(x) 2024-03-08 22:42:26 +01:00
florian
5086cf7e72 * set packenum and setalloc to defined values when changing mode, resolves #40056 2024-03-08 20:12:55 +01:00
J. Gareth "Curious Kit" Moreton
1dbcba4796 * arm/a64: Bug fix where instructions optimised into "mov r0,r0"
could leave registers undefined in some circumstances
2024-03-08 18:24:52 +00:00
Michaël Van Canneyt
4c434ceb08 * Only consume semicolon after uses clause when units have been connected. Fixes remaining failing tests 2024-03-08 11:31:49 +01:00
Michaël Van Canneyt
22de07446d * Fix tgeneric91, need to postpone some additional generic procedures 2024-03-07 16:12:24 +01:00
Michaël Van Canneyt
b2bc020fd7 * Handle rename of module during parsing, rebuild hash list. Fixes broken test tb0406.pas 2024-03-07 10:26:22 +01:00
florian
f41025f5dd * optimize also -(x+1) and -(1+x) into not(x) 2024-03-06 22:56:37 +01:00
Michaël Van Canneyt
2e6c3b060d * Initialize firstwaiting, after remark by Pierre 2024-03-06 21:55:47 +01:00
Michaël Van Canneyt
76687a04e5 * Fix TW22160B1 2024-03-06 17:08:52 +01:00
Pierre Muller
821f3e326f Fix compilation with -dDEBUG_DEVIRT 2024-03-06 14:40:22 +00:00
Pierre Muller
cc552c0815 Fix compilation with -dEXTDEBUG 2024-03-06 14:34:53 +00:00
Pierre Muller
9db42f5e67 Fix post_load_or_compile tppumodule method for SHORT_ON_FILE_HANDLES code by adding from_module parameter
Fixes compilation of text mode IDE for go32v2 target.
2024-03-06 14:16:37 +00:00
florian
0fb4fca957 * fix building of llvm compiler after node flag refactoring 2024-03-05 22:23:39 +01:00
florian
59c77a48b5 * transform -x-1 into not(x), resolves #40313 2024-03-05 22:11:32 +01:00
florian
1f2203c304 * fix compilation with 3.2.2 rtl 2024-03-05 22:11:32 +01:00
Michaël Van Canneyt
a15dfba971 * Fix compilation 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
325d29307f * Indentation and casing changes 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
91946b78d5 * Fix xtensa compilation 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
4e8b1cb97a * Fixed signature of insert_init_final_table 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
64e7dcbc81 * Log continue result 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
6ac14de986 * Properly handle finish state 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
42c9eb4096 * Add Logging of tasks under define 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
c96ef4902b * Handle finish state separately 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
2ba04dbd13 * generate init_final table from actual uses clauses 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
0bf0f26dd5 * Introduce m_processed 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
546de9f7e7 * Return first waiting in usedunitsloaded 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
c98e160c19 * Introduce state variables, used to construct list of used units 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
462c201ce6 * Introduce m_processed 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
5298e25c84 * Introduce task (Single main-level task at the moment, no change in behaviour). 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
881eb0fab5 * Check whether call to deref(impl) is needed during re-resolve (indexes may be -1 if not yet built) 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
a5caf91f74 * Split load_ppu for clarity 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
8aa9ac99a6 * Remove loaded_from in tmodule. The same unit can be loaded from different places 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
9cc30829fa * Restore messages state 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
1351746a46 * Make tglobalstat a class 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
6f7481fd24 * Remove freeold from set_current_scanner 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
7cd044eae7 save/restore state when loading other modules. 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
d9317e5df5 * Remove use of current_module 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
a81715d6ea * Pass loaded from 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
3ce07ef6fa * use set_current_scanner, add mainscanner 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
93ae6261cc * Make current_scanner a function/procedure to better control lifetime 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
4443e83b75 * replace/restore_scanner use var in state to make sure the correct scanner is freed 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
8fa3c57c1b * split module creation from parsing start 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
5b27fa9375 * Remove commented variables 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
83b5047931 * Move program/library header parsing to separate routines 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
b45aee980f * Split parsing from post-processing, code generation and linking 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
122251f71d * Move interface parsing part to separate routine so we can split tasks later 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
560d597c85 * Move implementation part to separate routine so we can split tasks later 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
97f159e4b2 * Refactory: remove current_module use from top-level parsing 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
277a3be9b0 * DRY Refactoring: introduce discardppu 2024-03-05 07:56:14 +00:00
florian
bf2a3566fa * patch by Sergey Larin: Compile dynarr := nil (and, preferably, SetLength(dynarr, 0)) as fpc_dynarray_clear, resolves #40309 2024-03-04 22:44:23 +01:00
florian
bcf320a76e * patch by Rika: Don’t pretend optinfo^.index can be aword(−1), resolves #40405 2024-03-03 22:49:28 +01:00
J. Gareth "Curious Kit" Moreton
1ab46c909a * Reduced the number of expensive calls to "GetUserCode" in DFA 2024-03-03 00:10:41 +00:00
florian
64141c8bdd * increase ppu long version as the format changed 2024-03-02 21:31:21 +01:00
florian
4103b3d180 * formatting 2024-03-02 21:31:21 +01:00
J. Gareth "Curious Kit" Moreton
dba69917a9 * Flags specific to TInlineNode have been moved to their own field 2024-03-02 21:31:21 +01:00
J. Gareth "Curious Kit" Moreton
4736cc2360 * Flags specific to TDerefNode have been moved to their own field 2024-03-02 21:31:21 +01:00
J. Gareth "Curious Kit" Moreton
179fc5848b * Flags specific to TArrayConstructorNode have been moved to their own field 2024-03-02 21:31:21 +01:00
J. Gareth "Curious Kit" Moreton
ecc16278f0 * Flags specific to TAssignmentNode have been moved to their own field 2024-03-02 21:31:21 +01:00
J. Gareth "Curious Kit" Moreton
0e5da37533 * Flags specific to TAsmNode have been moved to their own field 2024-03-02 21:31:21 +01:00
J. Gareth "Curious Kit" Moreton
c21a0f0654 * Flags specific to TModDivNode have been moved to their own field 2024-03-02 21:31:21 +01:00
J. Gareth "Curious Kit" Moreton
b804fc5164 * Flags specific to TAddNode have been moved to their own field 2024-03-02 21:31:21 +01:00
J. Gareth "Curious Kit" Moreton
5ea60b97b1 * Clarity over blocknode and VMT flags. nf_usercode_entry doesn't need to be cascaded in "firstpass" as TBlockNode.Simplify already does this 2024-03-02 21:31:21 +01:00
J. Gareth "Curious Kit" Moreton
1bba83cebb * Flags specific to TVecNode have been moved to their own field 2024-03-02 21:31:21 +01:00
Michaël Van Canneyt
05f0ceeb26 * Atributes for class/record methods 2024-03-02 14:15:22 +01:00
Michaël Van Canneyt
2c9870f85a * Attributes must be assigned only to elements before the first colon 2024-02-29 10:22:19 +01:00
Michaël Van Canneyt
4769ed948a * Add codeaddress to extended RTTI for static methods 2024-02-28 11:52:16 +01:00
florian
f9b98092c4 * stack checking is actually 'S' 2024-02-27 22:37:01 +01:00
Nikolay Nikolov
6a28ac53da + support the native exception instructions in TWasmValidationStacks.Validate 2024-02-27 12:54:56 +02:00
Nikolay Nikolov
9da276b352 * fixed bug in thlcgwasm.a_op_reg_reg_reg_checkoverflow that used to generate
code that fails WebAssembly validation
2024-02-27 11:59:39 +02:00
florian
1966ce7c1c + Skylake-X for i386 2024-02-26 22:41:55 +01:00
Nikolay Nikolov
f2d739b93a + perform WebAssembly validation, if the compiler is compiled with the
DEBUG_WASM_VALIDATION defined
2024-02-26 12:13:59 +02:00
florian
cad21584e5 + Skylake-X 2024-02-25 22:52:30 +01:00
Michaël Van Canneyt
fb821b8c9b * Allow use of attributes on fields and properties in records and classes 2024-02-25 19:57:39 +01:00
Michaël Van Canneyt
91284ba543 * Create and correctly typed variable for fieldsym instead of using typecasts 2024-02-25 19:57:39 +01:00
Nikolay Nikolov
0ae014a98f + support the BR and BR_IF instructions in TWasmValidationStacks.Validate 2024-02-25 13:52:34 +02:00
Nikolay Nikolov
13f58fe343 + support if,block,loop,else,end_if,end_block,end_loop in TWasmValidationStacks.Validate 2024-02-25 13:08:41 +02:00
Nikolay Nikolov
472f9be9a6 + support the global.get and global.set instructions in TWasmValidationStacks.Validate 2024-02-25 11:38:36 +02:00
Nikolay Nikolov
ab65c9889b + added the WasmBasicType to TWasmGlobalAsmSymbol. This will help WebAssembly
validation and stack tracking.
2024-02-25 08:54:39 +02:00
Nikolay Nikolov
f4b9d51aff + introduced TWasmGlobalAsmSymbol subclass of TAsmSymbol. Use it for all
AT_WASM_GLOBAL symbols. This allows in the future to add extra data to the
  TWasmGlobalAsmSymbol, such as the WebAssembly global type, which will aid in
  WebAssembly validation and stack tracking.
2024-02-25 07:29:56 +02:00
Nikolay Nikolov
b367d7c905 + introduced TAsmData.WeakRefAsmSymbolByClass 2024-02-25 07:18:22 +02:00
Nikolay Nikolov
26a2ae92ad + introduced TAsmData.RefAsmSymbolByClass - similar to RefAsmSymbol, but allows
to create a subclass of TAsmSymbol even in the case of external symbol.
2024-02-25 07:15:23 +02:00
Nikolay Nikolov
81d98f5ae2 + support the CALL instruction in TWasmValidationStacks.Validate 2024-02-25 04:51:14 +02:00
Nikolay Nikolov
21cc89f1e3 + added a second TWasmFuncType parameter to the CALL WebAssembly instruction. It
is not part of the WebAssembly syntax and binary encoding, but it helps
  WebAssembly stack tracking and validation.
2024-02-25 04:48:17 +02:00
florian
587af1c78e * icelake is x86-64-v4 2024-02-24 21:54:11 +01:00
J. Gareth "Curious Kit" Moreton
7c5847bc70 * x86: "StcClcSet(c)2Mov" optimisation now checks to see if the destination register is in use 2024-02-24 20:37:10 +00:00
Michaël Van Canneyt
a2939e4187 * Force VMT at first position in system.tobject 2024-02-24 18:11:23 +01:00
Nikolay Nikolov
2dcb15f88f + support a_call_indirect in TWasmValidationStacks.Validate 2024-02-24 10:49:15 +02:00
florian
37ed03667f * fixed fpu_x86_64_v4_flags 2024-02-23 21:51:37 +01:00
Pierre Muller
e7f9626592 Be sure not to add a symbol with empty name as an alias for function return variable 2024-02-23 16:00:05 +00:00
Pierre Muller
37c3e86c7f Also reset check_valid_var after calling var_para_allowed 2024-02-23 15:48:50 +00:00
Sven/Sarah Barth
3447512e29 * ensure that "type SomeName = type reference" is still allowed when function references are disabled
+ added test
2024-02-23 15:31:38 +01:00
florian
3cf7890352 * don't throw an internalerror in case of an illegal assignment to an open array, resolves #40662 2024-02-22 22:35:18 +01:00
florian
b8bf295cd1 * patch by Rika: Fold repetitive scandir.pas cases, resolves #40660 2024-02-21 22:01:44 +01:00
Sven/Sarah Barth
5c890b59e3 * fix #40655: apply changes to packrecords, packenum and setalloc using the recordpending*() functions so that they are applied correctly in case of them being used directly after a {$POP}{$PUSH} sequence
+ added test
2024-02-20 23:52:52 +01:00
florian
bccc0b195e * allow type = type ... ; syntax only for previously declared types, avoids also internal error for #40566 2024-02-20 23:14:31 +01:00
florian
bf57750436 * cosmetics 2024-02-19 22:27:06 +01:00
florian
a75e453c30 + thlcgobj.location_force_mem now supports LOC_JUMP as well, resolves #40650 2024-02-19 22:22:12 +01:00
Pierre Muller
728fb7c58c Set ba variable upfront to avoid warning treated as error 2024-02-19 22:12:46 +01:00
Jonas Maebe
a512273976 WPO: handle classes defined in localsymtables
Can happen since the support for anonymous methods
2024-02-19 21:26:42 +01:00
florian
906571fa25 * improve pretty printing of symbols 2024-02-19 20:41:08 +01:00
Pierre Muller
79ed0db624 Avoid warning about unintialized 'ba' variable 2024-02-19 20:37:35 +01:00
Pierre Muller
2044868c10 Swap real constant in internal assembler 2024-02-19 20:19:36 +01:00
Pierre Muller
e3b93b07c6 * Fix writereloc for cross-endian compilation 2024-02-19 20:19:36 +01:00
Pierre Muller
f3e03f0483 Fix tabs 2024-02-19 20:19:35 +01:00
Pierre Muller
1d1e070ad2 Support cross-endian compilation for telfobjdata.writereloc method 2024-02-19 20:19:35 +01:00
Pierre Muller
5c564ea940 Use writeint8/writeuint8 methods to avoid cross-endian issues 2024-02-19 20:19:35 +01:00
Pierre Muller
ca6fe96360 Add writeInt8/writeUInt8 methods to fix some cross-endian generation issues 2024-02-19 20:19:35 +01:00
florian
af482fde23 * generate specializations only of no error happened so far to prevent further (internal)errors, resolves #40646 2024-02-18 23:08:21 +01:00
Michaël Van Canneyt
ccb1985953 * Fix latex error due to unescaped dollar 2024-02-18 21:39:04 +01:00
Pierre Muller
462d0eb07c Restrict use of A_MOVE to ufromsize and utosize = OS_INT. (contributed by Jinyang He)
Fix issue #40648
2024-02-18 20:18:50 +00:00
Sven/Sarah Barth
ea102d792f * fix #40634 the 2nd: a (strict) protected symbol in a parent class of the owner is supposed to be visible
+ added test
2024-02-18 19:35:24 +01:00
Sven/Sarah Barth
5e05630713 * fix the internal error of #40639; however as the test code in question will only compile correctly with the next commit no test is added yet 2024-02-18 19:35:24 +01:00
Sven/Sarah Barth
1dbde8a79d - remove no longer required check as that is now handled by check_strict_private (not to mention that the check had been placed incorrectly anyway...) 2024-02-18 19:35:24 +01:00
Sven/Sarah Barth
11200cfaf6 * use check_strict_private and check_strict_protected in their respective non-strict checks to avoid code duplication 2024-02-18 19:35:23 +01:00
Sven/Sarah Barth
852aee489c * move the checks for strict private and protected into their own nested functions 2024-02-18 19:35:23 +01:00
J. Gareth "Curious Kit" Moreton
ae927b0689 * x86: Fixed "Cmp1Jl2Cmp0Jle" and "CmpJe2NegJo" optimisations
being applied incorrectly if another jump follows
2024-02-18 15:37:27 +00:00
J. Gareth "Curious Kit" Moreton
e406cbd9c8 * x86: Minor efficiency gains in OptPass1CMP 2024-02-18 15:37:27 +00:00
J. Gareth "Curious Kit" Moreton
1e0f6f9f64 * x86: Fixed error in "LeaLea2Lea 1" optimisation
not properly accounting for the first LEA
	 instruction having a repeated register
2024-02-18 15:31:20 +00:00
Pierre Muller
692754b422 Move test to end of possible conversion and add check_valid_var boolean variable 2024-02-17 21:33:52 +00:00
Pierre Muller
f39cfc75fc First attempt to fix bug report #40537 2024-02-17 21:33:52 +00:00
florian
8146443336 + set pi_do_call on ARM as well if we check for fpu exceptions 2024-02-17 21:03:55 +01:00
Michaël Van Canneyt
7a29d8f54d * Fix compilation with DEBUG_NODE_XML 2024-02-17 11:04:29 +01:00
florian
a736a4bba7 + set pi_do_call on RiscV as well if we check for fpu exceptions 2024-02-16 22:48:14 +01:00
Sven/Sarah Barth
d9903e6e16 * fix #40634: correctly check visibility for child classes in case of a mixture of specializations and non-specializations
+ added test
2024-02-16 16:54:23 +01:00
florian
421d67556a + set pi_do_call on loongarch64 as well if we check for fpu exceptions 2024-02-15 22:47:31 +01:00
florian
1ee9a39fe2 + lazarus project for a loongarch64 compiler 2024-02-15 22:47:31 +01:00
florian
57f6ed804e + set pi_do_call on xtensa as well if we check for fpu exceptions
* cosmetics
2024-02-14 23:04:25 +01:00
J. Gareth "Curious Kit" Moreton
f7e4c0f282 * 3-operand LEA instructions are now expanded if the latency could cause slowdown 2024-02-14 20:59:01 +00:00
Michaël Van Canneyt
fe62b3ace8 * Introduce constwresourcestring - in unicode mode, resource strings are unicode strings, and must be streamed differently 2024-02-13 19:44:36 +01:00
florian
a71cc71585 + function needs_check_for_fpu_exceptions to unify fpu exception handling 2024-02-13 17:42:21 +01:00
J. Gareth "Curious Kit" Moreton
629c87efc8 * x86-64: Typo fixed in FPU type string array 2024-02-13 14:39:29 +00:00
florian
3ed5a4a022 + when calling FPC_THROWFPUEXCEPTION in a sub routine, pi_do_call must be set, fixed for aarch64 2024-02-12 23:25:35 +01:00
Pierre Muller
eae74aaee0 Follow sdas documentation for .ascii limitations by using only printable chars and .byte for others 2024-02-12 14:03:02 +00:00
Pierre Muller
53bf5dc6ef Avoid wrong typecast by adding check that p1 is an instuction before casting it to taicpu 2024-02-12 10:39:18 +00:00
J. Gareth "Curious Kit" Moreton
271f69db12 * arm/a64: "OptPass2AND" and "OptPass2CMP" adapted to remove vestigial CMP and TST instructions 2024-02-11 21:39:19 +00:00
J. Gareth "Curious Kit" Moreton
6b2e4fa413 * arm: "OpCmp2OpS" moved to Pass 2 so it doesn't conflict with AND; CMP -> TST optimisation 2024-02-11 21:39:19 +00:00
J. Gareth "Curious Kit" Moreton
bf29f2051c * arm/a64: Added new TST post-peephole optimisation to replace previous AND/CMP/B(c) optimisation 2024-02-11 21:39:19 +00:00
J. Gareth "Curious Kit" Moreton
b18c10d0d8 * arm/a64: New "OptPass2TST" routine to catch "TST; B.c; AND -> ANDS; B.c" optimisation 2024-02-11 21:39:19 +00:00
J. Gareth "Curious Kit" Moreton
9f19f582c4 * arm/a64: New AND/CMP -> TST or ANDS optimisation 2024-02-11 21:39:19 +00:00
J. Gareth "Curious Kit" Moreton
29916bc6f6 * arm: Fixed "RegInInstruction" and "RegModifiedByInstruction" not handling the flags properly 2024-02-11 21:39:19 +00:00
J. Gareth "Curious Kit" Moreton
38d2f3d58c * a64: Renamed OptPostCMP/And to PostPeepholeOptCMP/AND for internal consistency 2024-02-11 21:39:19 +00:00
J. Gareth "Curious Kit" Moreton
d7d4b446c1 * FindRegAllocBackward will now return nil if it hits a dealloc for the register first 2024-02-11 21:39:19 +00:00
J. Gareth "Curious Kit" Moreton
1fafcbc125 * New "TryRemoveRegAlloc" optimisation utility 2024-02-11 21:39:19 +00:00
florian
4f82fade82 * extend LeaCallLeaRet2Jmp optimization to work on windows 2024-02-11 18:56:26 +01:00
J. Gareth "Curious Kit" Moreton
62495c964a * x86: New "aoc_DoPass2JccOpts" option to catch branch and
STC/CLC optimisations that only manifest in Pass 2
2024-02-11 15:05:57 +00:00
J. Gareth "Curious Kit" Moreton
2055ef4e88 * x86: STC/CLC optimisations can now handle multiple Jcc instructions 2024-02-11 15:05:57 +00:00
J. Gareth "Curious Kit" Moreton
de03a1b894 * x86: Additional STC/CLC; J(N)C deterministic jump optimisation 2024-02-11 15:05:57 +00:00
J. Gareth "Curious Kit" Moreton
698d432cce * x86: Separated out Jcc; STC/CLC optimisation and added additional peephole optimisations 2024-02-11 15:05:57 +00:00
J. Gareth "Curious Kit" Moreton
3e06242fd8 * x86: New "STC/CLC; MOV" peephole optimisation 2024-02-11 15:05:57 +00:00
J. Gareth "Curious Kit" Moreton
d06dd2b0ea * x86: New "Jcc; CLC/STC; .Lbl" optimisation 2024-02-11 15:05:57 +00:00
florian
2575cbc439 * complain about turned off support of c style operators only in the parser,
so error recovery is better
2024-02-11 11:05:05 +01:00
florian
8a48d1bbbc * clean up of arrayconstructor_to_set, the stringdef case didn't work for years and is not tested, so it probably is not supposed to be there at all 2024-02-10 22:16:02 +01:00
florian
bc0d2293a1 * stricter type checking for set constants, resolves #40631 2024-02-09 23:36:44 +01:00
Sven/Sarah Barth
43721f21c4 * fix #40621: when checking for visibility of members then always use the genericdefs for specializations for correct scoping
+ added test
2024-02-09 17:24:39 +01:00
Sven/Sarah Barth
ed8a05d697 * use iscurrentunit only when there isn't a suitable def that the moduleid of the symtables can be compared to 2024-02-09 17:22:46 +01:00
Sven/Sarah Barth
ddc2259e5e * protect against comparisons of nested types of generics and specializations 2024-02-09 17:14:29 +01:00
Sven/Sarah Barth
2c527cfc01 * fix typos in comment, no code changes 2024-02-09 14:01:00 +01:00
Nikolay Nikolov
26855a29c8 * fix warning 2024-02-08 16:54:33 +02:00
Nikolay Nikolov
e073d5f7f7 + implemented support for the local.get, local.set and local.tee instructions in TWasmValidationStacks.Validate 2024-02-08 16:49:45 +02:00
J. Gareth "Curious Kit" Moreton
b4eabbe5ce * x86: Fixed CPU feature flags for AMD Jaguar and Piledriver 2024-02-06 22:15:51 +00:00
J. Gareth "Curious Kit" Moreton
e4bd58d66a * x86: Replaced CPU features array with "cpu_x86_64_v1_flags" where possible 2024-02-06 22:15:51 +00:00
florian
d7a486f225 * comment fixed, hint by Maxim Ganetsky 2024-02-06 22:09:52 +01:00
florian
f80f1112d4 + Zen 4 2024-02-05 23:18:07 +01:00
Nikolay Nikolov
28c4c58b34 * fix warning 2024-02-05 23:35:45 +02:00
Nikolay Nikolov
d7581aa1ee + implemented TWasmValidationStacks.Validate for many (but not all, yet) instructions 2024-02-05 23:29:44 +02:00
florian
ac6dc582be + also add x86-64 as cpu type (gcc compatibility) 2024-02-03 22:40:54 +01:00
J. Gareth "Curious Kit" Moreton
3882066f23 * Speed optimisations for peephole register tracking functions 2024-02-03 20:30:46 +00:00
J. Gareth "Curious Kit" Moreton
05d6e20acc * New Boolean "SetAndTest" utility function 2024-02-03 20:30:46 +00:00
florian
d44cae14f5 * decide more sophisticately if a temp. var is needed for fixing #40618 2024-02-02 22:00:22 +01:00
Sven/Sarah Barth
27a2a04279 * fix #40618: apply adjusted patch by Евгений Савин (@jack128a) so that a non-load case expression is loaded into a temp first when converting a single range branch into an if-clause
+ added test
2024-02-02 15:55:40 +01:00
florian
f8dbb09a46 * fixed some issues with the x86-64 instruction versions
* use more of the constants
2024-02-01 22:08:27 +01:00
Nikolay Nikolov
e53620ebdb * fix warnings 2024-02-01 01:20:15 +02:00
florian
ae465fa8dc + introduce x86-64 microarchitecture levels for cpu and fpu flags 2024-01-31 22:32:57 +01:00
Nikolay Nikolov
5e0dcfb49b + introduced TWasmValidationStacks.Unreachable 2024-01-31 02:57:19 +02:00
Nikolay Nikolov
24315a7f28 + introduced TWasmValidationStacks.label_types 2024-01-31 02:45:43 +02:00
Nikolay Nikolov
f3e667da42 + introduced TWasmValidationStacks.PopCtrl 2024-01-31 02:38:09 +02:00
Nikolay Nikolov
4cb97dcdb3 * fixed warning 2024-01-31 02:33:31 +02:00
Nikolay Nikolov
4cc5cf4d0e + introduced TWasmValidationStacks.PushCtrl 2024-01-31 02:25:44 +02:00
Nikolay Nikolov
18c6e13f45 * fixed warning 2024-01-31 02:19:03 +02:00
Nikolay Nikolov
064adbf3f8 + introduced TWasmValidationStacks.PopVals 2024-01-31 02:15:09 +02:00
Nikolay Nikolov
4d5479741d + introduced TWasmValidationStacks.PushVals 2024-01-31 02:11:59 +02:00
Nikolay Nikolov
2d5c1d43cf + introduced TWasmValidationStacks.PopVal(expect) 2024-01-31 02:10:05 +02:00
Nikolay Nikolov
d575aa5240 + introduced TWasmBasicTypeList 2024-01-31 01:55:38 +02:00
Nikolay Nikolov
1786875319 + implemented TWasmValueStack.GetCount
+ implemented TWasmControlStack.GetCount
+ implemented TWasmValidationStacks.PopVal
2024-01-31 01:52:05 +02:00
Nikolay Nikolov
3f0853692c + implemented methods in TWasmControlStack: Push, Pop, GetItems, SetItems 2024-01-31 01:20:24 +02:00
Nikolay Nikolov
506634f261 * TWasmControlFrame changed to a record 2024-01-31 01:05:02 +02:00
florian
ff3b4adc27 + more CPU and FPU flags added 2024-01-30 22:55:42 +01:00
Pierre Muller
529b64790b Avoid 'false' warning: Local variable "gap_index" does not seem to be initialized on cycle with -O3 option 2024-01-29 18:15:28 +01:00
J. Gareth "Curious Kit" Moreton
bac4ca19e7 * Fixed internal error 2022041701 number clash (LLVM changed to 2022041730) 2024-01-28 09:34:14 +00:00
florian
b32573d1eb * inserting $result into the symtables should never trigger a duplicate symbol error, resolves #40608 2024-01-27 22:05:31 +01:00
J. Gareth "Curious Kit" Moreton
b514e979bd * Fixed issue where OptPass2CMP and OptPass2TEST didn't drop out on labels etc. 2024-01-27 19:00:50 +00:00
J. Gareth "Curious Kit" Moreton
2e441609be * Fixed issue where TryCmpCMovOpts produced bad
code if the last MOV got moved.
2024-01-27 19:00:50 +00:00
Pierre Muller
11b0b9dc57 Use reverse_byte to write constant sets in cross-endian configuration 2024-01-25 11:04:42 +00:00
Pierre Muller
5eda6e027d * Add internal_endian field to tppudumpfile class
* Check that this new field is indeed set, once only, by
    header flags.
  * Use this flag to extract high and low parts of floatx80
    record for soft floatx80 support.
2024-01-25 11:00:28 +00:00
Pierre Muller
71ba76532b * Fix writing of 'comp' type depending on FPC_COMP_IS_INT64 macro.
* Fix writing of floatx80 on systems with gaps due to alignment requirements.
2024-01-25 10:17:11 +00:00
Pierre Muller
8ae28b4846 Fix writing of low qword of floatx80 real type into 10-byte array on big endian systems 2024-01-25 10:13:21 +00:00
Pierre Muller
3db060e47a Use writeUInt32LE/writeUInt16LE method to write multi-byte integer in importlib method in t_win unit (as all supported CPUs are little endian) 2024-01-25 01:01:06 +00:00
florian
c4fc5fc916 * disable OptPass2Test and OptPass2CMP for now as it seems to result in buggy code 2024-01-23 22:11:59 +01:00
Sven/Sarah Barth
981ec64666 * fix #40594: when assigning a nested function to a function reference don't check for the nested procvars parameter, because nested functions can be treated like anonymous functions here
+ added test
2024-01-22 22:27:33 +01:00
Sven/Sarah Barth
feb79e0068 - the setter for tloadnode.procdef is not used, so remove it so that that tloadnode.setprocdef can be extended 2024-01-22 22:27:33 +01:00
J. Gareth "Curious Kit" Moreton
46fa168d43 * Code that checks for divisions against -1 is now not inserted if
it's not necessary (e.g. no downsizing)
2024-01-22 21:17:05 +00:00
J. Gareth "Curious Kit" Moreton
0943458713 * More efficient if-statement construction in tmoddivnode.simplify 2024-01-22 21:17:05 +00:00
Sven/Sarah Barth
47c21fd1bc * fix #40593: don't check for a static method when assigning a methodpointer to a function reference
+ added test
2024-01-22 19:44:36 +01:00
Nikolay Nikolov
6aa49038a5 * inverted the indices of TWasmValueStack, so that item 0 is top of stack 2024-01-22 11:02:32 +02:00
Nikolay Nikolov
fadf43a33b + added TWasmControlStack and frame. Not used, yet. Will be used in the future
for WebAssembly stack tracking and validation.
2024-01-22 10:15:43 +02:00
J. Gareth "Curious Kit" Moreton
0962578511 * Streamlined label referencing 2024-01-21 16:45:38 +00:00
Charles Averill
bb2e2f83e9 Add struct field names to subscriptn nodes in parse tree output 2024-01-21 16:39:09 +00:00
Charles Averill
cd9ed54d35 Add string constant values to stringconstn nodes in parse tree output 2024-01-21 16:39:09 +00:00
florian
7bbd33bcd6 * last commit was not complete, fixed 2024-01-21 15:26:21 +01:00
florian
79f6ee538d * fix compilation on 32 bit hosts 2024-01-21 15:25:36 +01:00
J. Gareth "Curious Kit" Moreton
74625648cf * Vectors of string constants are now simplified into ordinal constants 2024-01-21 11:56:09 +00:00
Pierre Muller
7595dd3624 Also swap word/dword in case of cross-endian compilation 2024-01-20 21:35:24 +01:00
Pierre Muller
9648463eb5 Add MaybeSwap for coffsectionrec records (needed for cross-endian compilation) 2024-01-20 21:35:24 +01:00
florian
615e9bdafd * copyright year for compiler logo updated 2024-01-20 20:54:52 +01:00
Onur ERÇELEN
44af9d87de Upload New File 2024-01-20 19:50:44 +00:00
Nikolay Nikolov
42f447257d + introduced TWasmValueStack for tracking the state of the WebAssembly stack. Not used, yet, but will be in the future. 2024-01-17 11:21:48 +02:00
Nikolay Nikolov
04a077707c * fix warning 2024-01-17 09:43:51 +02:00
Nikolay Nikolov
03fc5d2323 + added a zero/unitialized/unknown value to TWasmBasicType: wbt_Unknown 2024-01-17 08:32:10 +02:00
florian
4867d48e99 + support for .debug_loc and .debuc_loclist sections 2024-01-16 23:24:37 +01:00
Nikolay Nikolov
f65e4f2385 * fixed bug in the handling of WebAssembly goto 2024-01-16 08:44:06 +02:00
Sven/Sarah Barth
1ffef6ed41 * print the whole symbol name for hint messages 2024-01-15 22:29:47 +01:00
Pierre Muller
4c330f2799 Issue internal error in def type is errordef 2024-01-15 19:54:04 +01:00
florian
5f42443db3 * several issues with the in_val_x optimization fixed 2024-01-14 18:58:08 +01:00
J. Gareth "Curious Kit" Moreton
01246e4d30 * Fixed issue where Val shortcutting would not compile under 32-bit systems 2024-01-14 03:43:39 +00:00
J. Gareth "Curious Kit" Moreton
6597f02ebc * The "Val" intrinsic is now simplified for string constants akin to a
pure function.
2024-01-13 22:24:08 +00:00
Nikolay Nikolov
a9316b1953 - removed the DEBUG_WASM_GOTO define from the .lpi file 2024-01-14 00:21:40 +02:00
Nikolay Nikolov
1fecb46c52 - removed the ENABLE_WASM_INTERNAL_LINKER define from the .lpi file 2024-01-12 21:17:49 +02:00
Pierre Muller
637c34571e Avoid range check error in AddNormalStringDef 2024-01-10 23:24:46 +01:00
Nikolay Nikolov
a8b4c0772c * fixed bug that caused 'c in ['a'..'z']' to fail on the WebAssembly target, when code is compiled with {$packset 1} 2024-01-10 03:11:13 +02:00
Karoly Balogh
19fe377455 m68k: fix tw40182 test 2024-01-09 10:57:11 +01:00
Karoly Balogh
88ffc9e228 m68k: refactored the optimizer to avoid direct asml management where possible, and use standard functions instead 2024-01-09 03:03:27 +01:00
Jonas Maebe
60e77de115 LLVM: remove flags used to support older LLVM versions 2024-01-08 19:33:28 +01:00
Karoly Balogh
020ca55e25 m68k: add more cases, where TST instructions can beoptimized away, because the previous instruction already sets all the required flags 2024-01-08 15:06:38 +01:00
Karoly Balogh
3c57eb42f9 do not display the changing assembler note, if the internal and the external assemblers are the same, or there's no internal assembler defined 2024-01-08 14:19:20 +01:00
Karoly Balogh
db137d0528 tabs to spaces cosmetics, no functional change 2024-01-08 14:19:20 +01:00
Nikolay Nikolov
fbcd90f286 + generate DWARF debug info for WebAssembly locals 2024-01-08 01:18:35 +02:00
Michaël Van Canneyt
82ac429954 * Fix missing escape for dollar sign 2024-01-07 20:19:38 +01:00
Sven/Sarah Barth
170c05592b * ensure that the legacy method table has the correct alignment on platforms that require it (e.g. SPARC64) 2024-01-07 18:09:51 +01:00
Sven/Sarah Barth
7163a893e9 * search using the real package name instead of the uppercased one so that an as-is cased package will be found as well 2024-01-07 18:09:50 +01:00
florian
7bb9638094 * copyright year updated 2024-01-07 17:58:52 +01:00
florian
f7bfa0e426 * range checking is already performed in pass_typecheck 2024-01-07 17:51:35 +01:00
florian
dbf6527508 * factor out pointer_dec 2024-01-07 17:32:50 +01:00
J. Gareth "Curious Kit" Moreton
1f178d381f * x86: PostPeepholeOptMov attempts to convert mov $0,%reg to
xor %reg,%reg and mov $-1,%reg to or $-1,%reg under
	 -Os even if the flags are in use by looking ahead.
2024-01-07 14:29:42 +00:00
J. Gareth "Curious Kit" Moreton
63879e74cd * x86: Additional TEST/CMP optimisations to optimise CMOV blocks
that aren't optimal due to register pressure
2024-01-07 14:29:42 +00:00
J. Gareth "Curious Kit" Moreton
0b6faeba68 * x86: CMOV block optimisation overhauled 2024-01-07 14:29:42 +00:00
Nikolay Nikolov
e3f4bad164 * fixed internal linker crash if no tags are defined (i.e. no WASM native exceptions used) 2024-01-07 03:29:32 +02:00
Nikolay Nikolov
9681378d37 + enable the WASI internal linker 2024-01-07 03:17:07 +02:00
Nikolay Nikolov
93365f7e38 * wasm internal linker: produce an internal error on unknown relocations 2024-01-07 02:41:53 +02:00
Nikolay Nikolov
cd72a8910e + wasm internal linker: implemented RELOC_TAG_INDEX_LEB relocations 2024-01-07 02:39:57 +02:00
Nikolay Nikolov
4084da63ab + wasm internal linker: create the tag section (if not empty) 2024-01-07 02:35:35 +02:00
Nikolay Nikolov
033a2ae2e7 * wasm internal linker: set mempos of the .wasm_tags (and .wasm_globals) section to 0 2024-01-07 02:12:49 +02:00
Nikolay Nikolov
6b47a03cc9 * wasm internal object reader: handle tag symbol flags properly (support weak and local symbols) 2024-01-07 02:08:32 +02:00
Nikolay Nikolov
59c88f4c79 + WASI internal linker: added the .wasm_tags exe section to the linker script 2024-01-07 01:56:34 +02:00
Nikolay Nikolov
1d48cd7eba * wasm internal linker: treat exception symbols as AB_COMMON 2024-01-07 01:50:16 +02:00
Nikolay Nikolov
07677f4214 * wasm internal object reader: convert R_WASM_TAG_INDEX_LEB relocations to relocation objects 2024-01-07 01:45:27 +02:00
Nikolay Nikolov
3121f3f8a0 * wasm internal object reader: validate that R_WASM_TAG_INDEX_LEB relocations point to a SYMTAB_EVENT symbol 2024-01-07 01:43:47 +02:00
Nikolay Nikolov
962b36a6e8 + wasm internal object reader: create symbols for SYMTAB_EVENT entries in the symbol table 2024-01-07 01:42:12 +02:00
Nikolay Nikolov
09accffd28 + wasm internal object reader: range check event symbols against the tag index space (imports + tag section) 2024-01-07 01:33:00 +02:00
Nikolay Nikolov
02b7cc0e56 + wasm internal object reader: read tags from the export section 2024-01-07 01:29:10 +02:00
Nikolay Nikolov
79d739baa6 + wasm internal object reader: bounds check the tag type index against the types table 2024-01-07 01:25:48 +02:00
Nikolay Nikolov
2de0bcb8d0 + wasm internal object reader: store the tags from the tag section in the TagTypes array 2024-01-07 01:23:05 +02:00
Nikolay Nikolov
55002d1905 + wasm internal object reader: read tag imports 2024-01-07 01:15:13 +02:00