Commit Graph

22527 Commits

Author SHA1 Message Date
florian
8465710329 + make use of mulx instruction, if available
git-svn-id: trunk@43706 -
2019-12-21 16:20:10 +00:00
florian
30927039a6 + MULX instruction
* change information for RORX corrected

git-svn-id: trunk@43705 -
2019-12-21 16:20:09 +00:00
svenbarth
0149d26adb * in PeepHoleOptPass1Cpu when an instruction contains a segment, don't replace the current instruction with the next, cause then we get an infinite loop when compiling on Win32 with -dTEST_WIN32_SEH -O4
git-svn-id: trunk@43704 -
2019-12-20 16:44:54 +00:00
svenbarth
1779011ab4 * fix typo in comment
git-svn-id: trunk@43703 -
2019-12-20 16:44:52 +00:00
florian
fe7d7aa1e7 * patch by Alfred to fix building on DragonFly OS, resolves #36450
git-svn-id: trunk@43696 -
2019-12-17 21:57:09 +00:00
florian
5f2410b871 * patch by J. Gareth Moreton to fix an ie 2018061400 on darwin
git-svn-id: trunk@43694 -
2019-12-16 21:15:57 +00:00
Jonas Maebe
0f57151d36 + recognise LLVM 9.0 (no changes needed compared to LLVM 8.0)
git-svn-id: trunk@43686 -
2019-12-14 17:15:27 +00:00
svenbarth
707f722531 * regenerate msg*.inc files after adding a new error message related to C blocks
git-svn-id: trunk@43685 -
2019-12-14 16:45:42 +00:00
svenbarth
8111e92e1f * rework syntax for cblocks: now a cblock directive is required
* additionally implicit calling conventions of cdecl or mwpascal now work as well
* adjusted tests
+ added tests

Note: the generator for packages/univint needs to be fixed, until then building on macOS will be broken

git-svn-id: trunk@43684 -
2019-12-14 16:45:38 +00:00
Jonas Maebe
c477816100 - removed LLVM support for clang < 7.0 and Xcode < 10.0: those versions
contain various bugs and can't even complete "make all", so there is no
    point in keeping them
   o changed default LLVM target version to 7.0

git-svn-id: trunk@43682 -
2019-12-14 14:59:05 +00:00
Jonas Maebe
a352a12bb4 * use value_real rather than value_curency when writing currency
realconstnodes (fixes tcurrency1, tw33439 and tw36179 with LLVM)
   o we need to load the fpu representation of the currency values,
     not the scaled currency value

git-svn-id: trunk@43681 -
2019-12-14 14:11:12 +00:00
svenbarth
22ce9006ab * fix number of last parser_* message entry
git-svn-id: trunk@43677 -
2019-12-11 22:43:03 +00:00
svenbarth
36e32ee607 * more correct method names (based on patch by Blaise.ru)
git-svn-id: trunk@43676 -
2019-12-11 22:43:00 +00:00
svenbarth
46a366d6ae * clear up file comment (based on patch by Blaise.ru)
git-svn-id: trunk@43675 -
2019-12-11 22:42:56 +00:00
svenbarth
bf5d75e594 * move the common sequence to build a VMT for an objectdef into a separate procedure (based on a patch by Blaise.ru)
git-svn-id: trunk@43674 -
2019-12-11 22:42:53 +00:00
svenbarth
a6354741e6 * TVMTBuilder.build_interface_mappings does not need to be public (based on patch by Blaise.ru)
git-svn-id: trunk@43673 -
2019-12-11 22:42:48 +00:00
pierre
8c2aa32683 * Remove duplicate ibextraheader handling.
* Move SymAnsiStr boolean setting inside parseextraheader function.
  * Only accept same CurrentPPULongVersion in parseextraheader function.

git-svn-id: trunk@43672 -
2019-12-11 17:14:27 +00:00
florian
ef7e4f6f62 * fix J. Gareth Moreton to resolve #36389
git-svn-id: trunk@43670 -
2019-12-09 22:00:45 +00:00
florian
599e2df71f o patch by J. Gareth Moreton, resolves r36371:
* This patch makes some minor improvements to the cross-platform code that deals with jump optimisations.
      More specifically, it attempts to do more in a single pass which has the nice side-effect of
      fixing a couple of minor mistakes (in some situations, it would erroneously remove an alignment entry).
      - Most improvements are with dealing with Jcc/JMP pairs and their equivalents on other platforms, by
      collapsing label clusters and stripping dead code as soon as it has enough information to do so, and being
      more intelligent before calling Continue to see if another optimisation can be performed in the same sitting.

      - RemoveDeadCodeAfterJump is now a function that returns True if a jump was found among the dead code,
      thus allowing the ability to flag the peephole optimizer for another iteration of Pass 1 - the
      destination label may have appeared earlier in the code and become dead as a result of the removal
      of the jump, thus opening up new optimisations with instructions that sat either side of the label.

      - Preliminary tests show that it does sometimes reduce the number of passes required to optimise a subroutine
      under -O3.

git-svn-id: trunk@43668 -
2019-12-09 20:58:31 +00:00
florian
2a315df80c * check in CheckLive* if a register allocator is initialized for a certain register type
git-svn-id: trunk@43665 -
2019-12-08 22:22:17 +00:00
florian
ac6e4f59c6 * better error recovery, resolves #36397
git-svn-id: trunk@43653 -
2019-12-05 20:46:50 +00:00
florian
266daa62f1 * updated arm linker script as proposed by Alfred, resolves #36395
git-svn-id: trunk@43651 -
2019-12-05 20:07:16 +00:00
Jonas Maebe
54d3c26e27 * renamed abi_linux386_sysv to abi_i386_dynalignedstack, and also use it
for Darwin-based i386 platforms

git-svn-id: trunk@43650 -
2019-12-05 19:38:01 +00:00
florian
0cb85eef9b * more currency fixes, should resolve #36176
git-svn-id: trunk@43635 -
2019-12-03 19:31:50 +00:00
pierre
c87facbae1 Use PInt64(@value_currency)^ construct to avoid internal error when starting from 3.0.4 ppcarm compiler
git-svn-id: trunk@43634 -
2019-12-03 16:05:30 +00:00
pierre
91e550edb6 Remove assigned but unused local variable i64 in taddnode.pass_typecheck_internal as suggested by Ondrej Pokorny
This also solves the "Invalid TypeCast Error" in rtl-objpas when compiled with -CriotR option.

git-svn-id: trunk@43631 -
2019-12-02 23:11:21 +00:00
svenbarth
927c91e093 * fix for Mantis #36388: correctly handle generic constraints when looking for helpers
git-svn-id: trunk@43629 -
2019-12-02 22:29:34 +00:00
svenbarth
f2818bfe7a * apply patch by Blaise.ru to remove last remnants of VMT regeneration which is no longer needed/used
git-svn-id: trunk@43628 -
2019-12-02 22:29:29 +00:00
svenbarth
3ced30f816 * apply (adjusted) patch by Blaise.ru: vmtentries is always created since 2008, so treat it as such (also fixes a memory leak in tobjectdef.getcopy)
git-svn-id: trunk@43626 -
2019-12-02 06:59:05 +00:00
svenbarth
ea75253926 * initialize the defid in trecorddef.create_global_internal as unique_id_str needs it
git-svn-id: trunk@43625 -
2019-12-02 06:58:59 +00:00
svenbarth
80a4a01f12 + add a method to tdef to initialize the defid from within a constructor
git-svn-id: trunk@43624 -
2019-12-02 06:58:47 +00:00
florian
b8a78b135c * simplified and improved TX86AsmOptimizer.RegModifiedByInstruction
git-svn-id: trunk@43623 -
2019-12-01 22:15:48 +00:00
florian
86d8e79e86 * fix some currency issues, resolves #33963 and #36179
git-svn-id: trunk@43620 -
2019-12-01 20:24:00 +00:00
florian
f2a8b8ad6a * adapt register if the size of the paraloc and the register differ, resolves #34409
git-svn-id: trunk@43617 -
2019-11-30 20:37:55 +00:00
svenbarth
06c1a17d13 * use tdef.unique_id_str to generate the unique internal name for anonymous record defs as using the count of the deflist is no longer correct
git-svn-id: trunk@43616 -
2019-11-30 17:40:27 +00:00
pierre
4e4f55ac0e Comparison nodes are always in LOC_REGISTER, never in LOC_JUMP for riscv32 or riscv64 CPUs
git-svn-id: trunk@43614 -
2019-11-29 23:28:05 +00:00
pierre
92b0ea7d02 Add explicit smallint typecast to first marameter of SarSmallint call to avoid range check errors
git-svn-id: trunk@43613 -
2019-11-29 23:26:45 +00:00
florian
d8f1aacd78 * better error recovery, resolves #36377
git-svn-id: trunk@43612 -
2019-11-29 22:13:17 +00:00
florian
4525edd9f7 * patch by J. Gareth Moreton: x86 implementation of RegModifiedByInstruction, resolves #36376
git-svn-id: trunk@43611 -
2019-11-29 21:57:53 +00:00
florian
3889529e45 * unified internalerror, resolves #36378
git-svn-id: trunk@43610 -
2019-11-29 21:06:12 +00:00
pierre
fb33da5f41 Change parameter type to tcgint for is_imm12 and is_lui_imm functions to avoid range check errors
git-svn-id: trunk@43609 -
2019-11-29 10:31:31 +00:00
pierre
7405ae2758 Fix trv32notnode, by using same code as for riscv64 CPU
git-svn-id: trunk@43607 -
2019-11-28 22:34:04 +00:00
pierre
3db08d28e9 Set default stack size for i8086-embedded target: 16384 for far data model, and 2048 for other memory models
git-svn-id: trunk@43604 -
2019-11-28 14:50:55 +00:00
pierre
a9bb9f7310 Add '.module nomips16' at assembly entry for mips/mipsel unless -a5 option is used
git-svn-id: trunk@43600 -
2019-11-27 22:56:35 +00:00
pierre
ba73f7376f Also accept -a5 for older binutils for mips and mpisel cpus
git-svn-id: trunk@43599 -
2019-11-27 22:54:47 +00:00
pierre
01fbad64b7 Use defined(aarch64) instead of defined(cpuaarch64) for FPC_HAS_INTERNAL_ABS_INT64
git-svn-id: trunk@43598 -
2019-11-27 22:15:23 +00:00
florian
7000d82dcd * do not convert cmp 0,... into test ...,... before the post pass of the peephole optimizer
as this conversion might result in missing further optimizer opportunities

git-svn-id: trunk@43596 -
2019-11-26 22:09:34 +00:00
florian
7e6eeebdf0 o patch by J. Gareth Moreton, seeks to improve maintainability, safety and efficiency
in the peephole optimizer by slightly modifying some function headers based
    on their intended purpose, resolves #36353
    * Non-virtual methods and class methods that don't need to access any fields from
      the current object are now static methods, thus removing the hidden "Self"
      parameter and reducing overhead. This includes a large number of
      frequently-used functions such as SkipEntryExitMarker and SuperRegistersEqual.
    * GetNextInstruction, GetLastInstruction, SkipEntryExitMarker and
      SkipLabels have had their 'var' parameter changed to an 'out' parameter because
      they shouldn't depend on its input value. This will cause the compiler to throw warnings
      if you start using the value without initialising it first, and may open up optimisation
      opportunities in the future (e.g. storing written values in a temporary register
      and only writing it to the actual variable when the routine exits).

git-svn-id: trunk@43595 -
2019-11-26 22:09:33 +00:00
Jonas Maebe
5800ac6213 * fix conversion from Objective-C class/protocol to tvarrec (store in
vPointer) (mantis #36362)

git-svn-id: trunk@43594 -
2019-11-26 21:24:56 +00:00
florian
cf0716123c * avoid overflow error
git-svn-id: trunk@43593 -
2019-11-26 19:39:04 +00:00