Commit Graph

22555 Commits

Author SHA1 Message Date
Jonas Maebe
797077855e * use constrained LLVM fp intrinsics for add/sub/mul/slash/fma/sqrt
operations when fastmath is not enabled

git-svn-id: trunk@43819 -
2019-12-30 15:05:09 +00:00
Jonas Maebe
b355ba3d39 * record whether a function uses fastmath, and define the function as
strictfp if it doesn't (so LLVM doesn't perform transformations that can
    change the fp/exception behaviour)

git-svn-id: trunk@43818 -
2019-12-30 15:05:06 +00:00
Jonas Maebe
67dbd0cdb3 * support nf_internal to ignore currency conversion adjustments also on
platforms that implement currency using a floating point type

git-svn-id: trunk@43817 -
2019-12-30 15:05:02 +00:00
Jonas Maebe
9bd33f7a45 + support for LLVM metadata constant string parameters
o they are implemented as a new metadata register class, whereby the
     subregister indicates the metadata type (currently always a string)
     and the superregister is an index in the metadata array (which
     contains the strings). LLVM metadata can only be passed as parameters
     to intrinsics in bitcode, so moves of metadata into other registers
     triggers internal errors and when moving them into parameters, we
     replace the parameter's register with the metadata register (and look
     up the corresponding string when writing out the bitcode)

git-svn-id: trunk@43816 -
2019-12-30 15:04:57 +00:00
florian
f7a052f884 + inline high(<dyn. array>), resolves #28536
git-svn-id: trunk@43808 -
2019-12-28 21:38:38 +00:00
florian
9bd7401ce9 * comment fixed
git-svn-id: trunk@43805 -
2019-12-28 18:18:41 +00:00
florian
00859420ab * correctly handle reading of class/object pointers in combination with @, resolves #26326
git-svn-id: trunk@43804 -
2019-12-28 17:59:23 +00:00
florian
ccf409c8a0 * use 64 bit code page in tppcshlshrnode.pass_generate_code for all 64 bit types,
resolves #33582

git-svn-id: trunk@43795 -
2019-12-25 22:11:31 +00:00
florian
051b9840a5 * write a proper error message if <int>/<int> is encountered while no
floating point support is available, resolves #32006

git-svn-id: trunk@43794 -
2019-12-25 18:09:30 +00:00
florian
fd0012deff * when copying goto nodes take care if the label node is part of the copied tree
or not, resolves #35820

git-svn-id: trunk@43793 -
2019-12-25 17:10:14 +00:00
svenbarth
f59eae4f81 * correctly handle local reference in the RISC V assembler readers (both 32 and 64 bit)
git-svn-id: trunk@43790 -
2019-12-25 15:23:28 +00:00
svenbarth
4ad7d552a1 * increase support for multilib binutils for RISC V by passing the correct ABI to the linker
git-svn-id: trunk@43789 -
2019-12-25 15:23:25 +00:00
svenbarth
114c27fb4e * increase support for multilib binutils for RISC V by passing the ABI to the assembler
git-svn-id: trunk@43788 -
2019-12-25 15:23:21 +00:00
Jonas Maebe
1a9e246c29 * added is_normal_fieldvarsym() helper and use it
o fixes several places where there was a check whether something is a
     fieldvarsym, but not whether it's an instance rather than a class field

git-svn-id: trunk@43786 -
2019-12-24 22:12:44 +00:00
Jonas Maebe
6d51c69dbe * fixed writing of calling convention for function declarations/definitions
in LLVM

git-svn-id: trunk@43785 -
2019-12-24 22:12:40 +00:00
Jonas Maebe
b89487e721 * fix paraloc def for vectors with vectorcall calling convention (was a single
element instead of a vector)

git-svn-id: trunk@43784 -
2019-12-24 22:12:37 +00:00
Jonas Maebe
96dfe3d03a * LLVM support for writing vector types
git-svn-id: trunk@43783 -
2019-12-24 22:12:34 +00:00
Jonas Maebe
f5833dc048 * support for marking arraydefs as vectors
git-svn-id: trunk@43782 -
2019-12-24 22:12:31 +00:00
Jonas Maebe
1e3f72403e * renamed getintparaloc to getcgtempparaloc
o it can be used for more than integer parameters

git-svn-id: trunk@43781 -
2019-12-24 22:12:25 +00:00
florian
a20209e691 + tf_init_final_units_by_calls
* arm-embedded generates direct calls for unit init/final now as well

git-svn-id: trunk@43771 -
2019-12-24 16:14:30 +00:00
florian
be0054eeb4 * fixed output of line numbers/columns with -vR
git-svn-id: trunk@43769 -
2019-12-24 16:14:29 +00:00
florian
ef87879402 * common naming for fpu_none string
git-svn-id: trunk@43768 -
2019-12-24 16:14:28 +00:00
florian
cbec738829 * last commit was not complete/earlier version committed
git-svn-id: trunk@43767 -
2019-12-23 23:07:26 +00:00
florian
abb79553d2 * optimize case statements with a single branch into if statements (ord const only)
git-svn-id: trunk@43766 -
2019-12-23 22:42:53 +00:00
florian
cb44d7d4e2 * some cleanup
git-svn-id: trunk@43765 -
2019-12-23 21:52:06 +00:00
florian
4de6b3e6b9 * do not crash when an unsupported code page is encountered, resolves #35581
git-svn-id: trunk@43764 -
2019-12-23 21:44:50 +00:00
florian
2f374a37b7 * patch by Bart Broersma to allow to declare "LongInt = AnsiString" comparison
operator in non-macpas modes, resolves #29460

git-svn-id: trunk@43709 -
2019-12-22 22:06:26 +00:00
florian
b8b5d84108 * missing +')' added
git-svn-id: trunk@43707 -
2019-12-22 20:41:48 +00:00
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