Commit Graph

25236 Commits

Author SHA1 Message Date
florian
2ce34f7bd3 * do constant folding on div <const. int> div <const. int>, resolves #39301 2021-09-02 22:04:42 +02:00
florian
3069d74ecc * handle constant folding correctly for <pointer>+<ord. constant>+<ord. constant>, resolves #39332 2021-09-01 21:32:27 +02:00
florian
1f272f8f90 * we cannot do SSA during partial writes to arrays which span multiple registers, resolves #39325 2021-08-31 21:32:50 +02:00
florian
4d8ecfb422 * unified internal error 2021-08-31 21:32:50 +02:00
ccrause
f134e3b0ee Sorted help options. 2021-08-29 21:14:23 +00:00
florian
d3615788a8 * generate a def. file only if really necessary 2021-08-29 21:00:51 +02:00
Sven Barth
efd0c250df * fix for #39310 by fixing various small issues in tabstractrecordsymtable.has_single_field:
- initialize the returned def to a safe default
  - correctly reset the found symbol for each loop
  - reset the result when descending into a record
+ added test
2021-08-28 20:02:28 +02:00
florian
4a67f098ee * reverted wrongly committed file 2021-08-25 10:41:03 +02:00
florian
a18a6b4391 + Aarch64: FMovFMov2FMov 2 optimization 2021-08-24 23:16:52 +02:00
ccrause
968d00fedf + Add support for -Adefault.
* Move help message for option -sT to the correct group of messages. 
  * Use shorter message to indicate switch to external asm. 
  * Adapted -sX messages because -sT doesn't force external assembler writer.
2021-08-24 17:01:50 +00:00
florian
ef31e8c2ed Merge remote-tracking branch 'origin/main' into tg74/avx512-0037785 2021-08-22 19:20:15 +02:00
Jonas Maebe
a73ee4f403 Solves #39296: x86-64 parameter zero/sign extension 2021-08-22 14:56:19 +00:00
florian
a77f5221f3 * check if git executable really exists 2021-08-21 20:38:34 +02:00
florian
61a3f6603d * change information for round* fixed 2021-08-20 23:55:17 +02:00
florian
a45123a87b * fix change information for popcnt 2021-08-19 23:01:59 +02:00
Don
f6636c9c1c Allow custom definition of GIT. 2021-08-19 07:51:36 +01:00
florian
a4878d892c * always use $(GIT) to call git 2021-08-18 15:19:24 +02:00
florian
3e3f99c328 * properly check if -unpushed should be appended in revision.inc 2021-08-18 10:49:42 +02:00
florian
4c1eb4e454 + include -unpushed in revision.inc if not all changes are pushed to the remote 2021-08-17 15:43:53 +02:00
florian
0ff3f04700 * use git describe to create a revision.inc if a .git dir is found 2021-08-16 21:24:49 +02:00
Yuriy Sydorov
07dcd22b1c * sizeof(array) and length(array) must return sizeUint in case the array
size does not fit in sizeint. This fixes a range check error during
  compilation on small CPU targets where allowed array size is 64K, but
  sizeint is 32K max.
2021-08-16 21:54:46 +03:00
Yuriy Sydorov
3ca73da912 * In TP-style INLINE, allowed the > modifier for global vars and relaxed range checks. 2021-08-16 17:36:12 +03:00
Yuriy Sydorov
64ddf22e1b * TP compatibility: For retro CPUs always copy the function result to
the register(s) on function exit if assembler blocks are present.
2021-08-16 00:40:34 +03:00
Yuriy Sydorov
c78e9557f8 * Added support for the old Turbo Pascal INLINE(data/data/...) statement.
It is available only in the TP mode.
2021-08-16 00:40:34 +03:00
Yuriy Sydorov
122ed4b76a * Support for sleb128 and uleb128 constants in the NASM writer.
* Added sleb128tostr() and uleb128tostr() methods to TExternalAssembler.
* Use these methods in assembler writers instead of code duplication.
2021-08-16 00:40:34 +03:00
Karl-Michael Schindler
dd4b4af6a5 compiler/msg/errord*.msg: Update of German error messages 2021-08-14 23:48:45 +02:00
FPK
bc2ed1a560 Merge branch 'main' into 'main'
Remove "r" from FPC revision.

See merge request freepascal.org/fpc/source!7
2021-08-13 20:39:18 +00:00
Yuriy Sydorov
07698050e5 * Before r35961 (back in 2017) some simple assignment optimizations, such as "x:=x+y" to "inc(x,y)", were performed when -O2 in tassignmentnode.simplify. In r35961 these optimizations were moved to a separate pass which is enabled only when -O3 by cs_opt_use_load_modify_store. This separate pass can benefit from other optimization. But worse code is generated with -O2 since then.
This commit restores applying of simple assignment optimizations when -O2.
2021-08-13 13:53:40 +03:00
Don
d147533c94 Remove "r" from FPC revision. 2021-08-13 11:18:42 +01:00
florian
306fae299e * patch by J. Gareth Moreton: AND/CMP optimisation, resolves #39287 2021-08-11 23:01:30 +02:00
Florian Klämpfl
62baa89646 Merge remote-tracking branch 'origin/main' into tg74/avx512-0037785
# Conflicts:
#	.gitattributes
#	compiler/msgidx.inc
#	compiler/msgtxt.inc
2021-08-10 23:30:02 +02:00
Yuriy Sydorov
10acbca828 * x86: Added the "test $-1,%reg" condition to the MovAndTest2Test optimization. 2021-08-09 23:52:44 +03:00
Yuriy Sydorov
6a3f32ba69 * optimize tests for a single bit "(a and one_bit_mask_const) = <> one_bit_mask_const" into "(a and one_bit_mask_const) <> = 0" to enable further CPU specific optimizations. 2021-08-09 18:38:58 +03:00
Yuriy Sydorov
136f042972 * It is still needed to release the temp allocated for the result of an assembler function if the result is not referenced. This fixes some EXTDEBUG warnings. 2021-08-06 21:43:10 +03:00
Yuriy Sydorov
5920d169c0 * Prevent double release of a temp. 2021-08-06 21:30:28 +03:00
florian
415bf22e01 * remove mhs_exceptions in might_have_sideeffects call for C operators: it improves code
and shouldn't hurt as this is no regression in comparison with current 3.2.x

git-svn-id: trunk@49621 -
2021-07-19 20:55:41 +00:00
florian
7a8893396d * revert last commit, avr4 has no call/jmp
git-svn-id: trunk@49620 -
2021-07-18 21:47:22 +00:00
florian
eb96734b20 * avr4 has mul instructions
git-svn-id: trunk@49619 -
2021-07-18 21:41:57 +00:00
florian
46507f9565 * Xtensa: optimize constant multiplications
git-svn-id: trunk@49618 -
2021-07-18 21:40:43 +00:00
florian
db8c723b9d * Xtensa: unified DataMov2Data optimization
git-svn-id: trunk@49616 -
2021-07-17 21:07:02 +00:00
florian
c67d35b8cc * patch by J. Gareth Moreton: x86: Minor bitwise optimisations, resolves #39299
git-svn-id: trunk@49614 -
2021-07-16 21:47:36 +00:00
svenbarth
2a2576b1d5 * further fix for Mants #26760: applied patch by Ondrej Pokorny to fix recompilation of units referenced with an "in" clause if no file extension is provided
+ added (interactive) test

git-svn-id: trunk@49613 -
2021-07-15 21:52:27 +00:00
florian
2629bd7ba9 * patch by J. Gareth Moreton: x86: Lea2Nop for stack pointer, resolves #39225
git-svn-id: trunk@49612 -
2021-07-15 20:58:46 +00:00
florian
0d6a1d24bd * might_have_sideeffects in gen_c_style_operator as proposed by runewalsh, resolves #39206
git-svn-id: trunk@49608 -
2021-07-13 18:31:38 +00:00
florian
d16160be91 * patch by J. Gareth Moreton: CMP chain shortcutting, resolves #39141
git-svn-id: trunk@49592 -
2021-07-10 20:29:00 +00:00
florian
c185ce02cc * patch by J. Gareth Moreton: x86: RegLoadedWIthNewValue overhaul and bug fix, resolves #39187
git-svn-id: trunk@49588 -
2021-07-09 20:58:42 +00:00
svenbarth
924f9466f0 * fix for Mantis #26760: apply patch by Ondrej Pokorny to ensure that units referenced by an "in"-clause are recompiled when they have been changed
+ added test (though due to the nature of the bug it needs to be interactive)

git-svn-id: trunk@49587 -
2021-07-09 15:52:00 +00:00
florian
cb0f422eb1 * patch by J. Gareth Moreton: x86: MovMovSar2MovCltd bug fix, resolves #39180
git-svn-id: trunk@49586 -
2021-07-08 20:40:10 +00:00
florian
86ac03e07e + support SHLX and SHRX in TX86AsmOptimizer.RegLoadedWithNewValue, resolves #39178
git-svn-id: trunk@49583 -
2021-07-07 20:28:04 +00:00
florian
ea47cb313d * patch by J. Gareth Moreton: improve MovAndTest2Test optimization, resolves #39156
git-svn-id: trunk@49580 -
2021-07-06 20:55:41 +00:00