Commit Graph

21732 Commits

Author SHA1 Message Date
nickysn
40e6c06f67 * fixes to the compiler util exe search routines, which caused the compiler to
erroneusly find '/usr/bin/ld' instead of '/usr/bin/ld.bfd' on OpenBSD, which
  silently produced broken executables, which made this bug even more "fun" to
  find. :)

git-svn-id: trunk@42128 -
2019-05-26 16:57:08 +00:00
nickysn
0c471494e8 * use explicitly GNU LD ('ld.bfd') on OpenBSD, instead of the default 'ld'
linker, because in OpenBSD 6.5, it has been replaced with the LLVM linker and
  the LLVM linker produces broken position independent executables with FPC.

git-svn-id: trunk@42127 -
2019-05-26 16:51:51 +00:00
Jonas Maebe
77658b925b * disable regular array -> dynamic array type coversion support unless
{$modeswitch arraytodynarray} is active (mantis #35576)
   o changed compiler to compile without this modeswitch
   o added the modeswitch to a test that depends on it

git-svn-id: trunk@42118 -
2019-05-25 12:31:32 +00:00
pierre
c752aa5cf5 Avoid incomplete case warning when compiled with -dTEST_WIN32_SEH
git-svn-id: trunk@42115 -
2019-05-24 10:14:51 +00:00
pierre
769f85783a List TSettings partially and improve generic output
git-svn-id: trunk@42111 -
2019-05-20 22:06:57 +00:00
pierre
dd418f24b5 Add DEBUG_PPU conditional code to be able to debug ppu changes (only useful for debugging purposes)
git-svn-id: trunk@42110 -
2019-05-20 12:48:12 +00:00
Jonas Maebe
aad87820e6 * abstracted registration of library init/fini routines (to be able to add
LLVM support)

git-svn-id: trunk@42104 -
2019-05-19 19:20:47 +00:00
Jonas Maebe
a418dc6c91 * made the fields array parameter of llvmgettemprecorddef "const", as it
doesn't get modified and hence doesn't need to be copied

git-svn-id: trunk@42103 -
2019-05-19 19:20:42 +00:00
Jonas Maebe
4c34b7b67d * fixed memory leak
git-svn-id: trunk@42101 -
2019-05-19 19:20:34 +00:00
Jonas Maebe
eb0f02348d * fixed loading parent frame pointer for nested procvars on targets that
that use explicit parentfp structs (fixes webtbs/tw17379 for llvm)

git-svn-id: trunk@42100 -
2019-05-19 19:20:29 +00:00
Jonas Maebe
47812c8a3d * don't double-define function aliases for Darwin defined via ".set" directive
git-svn-id: trunk@42095 -
2019-05-18 18:41:38 +00:00
Jonas Maebe
8ec3cd6390 * append rather than insert the alias symbols for the program/procedure
initialisation/finalisation routines
   o this ensures the procdef's mangled name and its first symbol match,
     which is required for Darwin when generating debug information and
     using ".set" directives to define alias symbols, because a symbol
     defined via ".set" cannot be used in a data relocations (and the DWARF
     debug generator uses the default mangled name, which used to correspond
     to the alias symbol due to the "insert" instead of "append")

git-svn-id: trunk@42094 -
2019-05-18 18:41:33 +00:00
Jonas Maebe
332679e28a * updated German message files (patch by Karl-Michael Schindler,
mantis #35559)

git-svn-id: trunk@42092 -
2019-05-18 12:29:35 +00:00
Jonas Maebe
7e51c5e856 * DFA now takes case-completeness into account (mantis #35598)
git-svn-id: trunk@42091 -
2019-05-18 12:01:41 +00:00
pierre
2ff391c25c Fix arm-aros rtl compilation
git-svn-id: trunk@42090 -
2019-05-17 06:39:57 +00:00
svenbarth
755e271b4e * fix for Mantis #35566 by applying patch by Martin Friebe: correctly dereference the 32-bit length value for Windows Widestrings
git-svn-id: trunk@42087 -
2019-05-16 20:56:18 +00:00
pierre
c0f064a35c Remove two warnings about missing case (others are still present in ppudump.pp source)
git-svn-id: trunk@42085 -
2019-05-16 12:42:39 +00:00
pierre
8d4588e1b2 Fix compilation of compiler with -dPREPROCWRITE
git-svn-id: trunk@42084 -
2019-05-16 12:17:32 +00:00
Jonas Maebe
cf9596421b * fixed crashes on platforms using parentfpstructs with generic routines
that contain nested functions (when specialised, procedures don't have
    the main function of the unit/program as parent procinfo)

git-svn-id: trunk@42063 -
2019-05-14 19:19:14 +00:00
Jonas Maebe
b291d17fc5 * fix overflow errors in case coverage code
git-svn-id: trunk@42059 -
2019-05-13 20:30:28 +00:00
Jonas Maebe
ba1b4b1c92 + support for verifying whether a case statements handles all possibilities
(based on patch by Martok)
   o enabled by default in ISO and Extended Pascal: compile-time error if not
     the case in ISO mode, warning and run-time error in Extended Pascal mode
   o warning enabled by default in all other modes for boolean, enumeration and
     subrange integer types with ranges different from the default ones
     (i.e., different from 0..255, -128..127, 0..65536, etc)
   o warnings for all ordinal types can be enabled in all modes with
     -CC

git-svn-id: trunk@42047 -
2019-05-12 14:29:11 +00:00
Jonas Maebe
281b3ad276 * fix case completeness and unreachable code warnings in compiler that would
be introduced by the next commit

git-svn-id: trunk@42046 -
2019-05-12 14:29:03 +00:00
Jonas Maebe
f76cde1c4c * set correct fileinfo for statements_til_end() block
git-svn-id: trunk@42044 -
2019-05-12 14:28:52 +00:00
svenbarth
faaa9f94fa * addstringdef() now correctly declares the debug information for a Windows WideString, so use that instead of treating it merely like a PWideChar
git-svn-id: trunk@42039 -
2019-05-11 15:38:59 +00:00
svenbarth
e769233436 * fix for Mantis #35386: use the correct size for the string's length (SizeInt for Ansi-/UnicodeString and DWord for WideString)
git-svn-id: trunk@42038 -
2019-05-11 15:38:56 +00:00
svenbarth
1349f1db03 * fix for Mantis #35359: only WideString counts the size in Byte, UnicodeString uses the size in WideChars
git-svn-id: trunk@42037 -
2019-05-11 15:38:51 +00:00
svenbarth
251c559662 * fix for Mantis #35533: when searching for helpers on types that usually don't support a point operator, don't use automatic dereferentiation
+ added tests

git-svn-id: trunk@42036 -
2019-05-10 20:56:41 +00:00
svenbarth
5a5b47fa24 + add support for MultiHelpers modeswitch by Ryan Joseph for Mantis #35159
+ added tests

git-svn-id: trunk@42026 -
2019-05-10 14:04:45 +00:00
svenbarth
0bd1687398 * fix for Mantis #35326 (applied patch by Cyrax): objcopy's --add-gnu-debuglink parameter doesn't handle quoted paths correctly, so quote the whole path
git-svn-id: trunk@42025 -
2019-05-10 12:59:26 +00:00
Jonas Maebe
079d616978 * fixed double free in LLVM code generator after r41963
git-svn-id: trunk@41976 -
2019-05-02 19:40:00 +00:00
Jonas Maebe
97a144ea6a - removed ttypedconstkind parameter from tai_simpletypedconst constructor,
as it always has to be tck_simple anyway

git-svn-id: trunk@41975 -
2019-05-02 19:39:56 +00:00
Jonas Maebe
213b87fe91 * optimized and simplified tai_aggregatetypedconst destruction
git-svn-id: trunk@41963 -
2019-04-30 19:36:46 +00:00
Jeppe Johansen
3ad450c636 avr: Add peephole optimization for in+sbr* bit test sequence.
git-svn-id: trunk@41962 -
2019-04-30 17:00:30 +00:00
Jonas Maebe
55aeac44f0 * micro-optimization for tentryfile.getbyte() (based on patch by
J. Gareth Moreton, mantis #35406)

git-svn-id: trunk@41924 -
2019-04-22 15:16:33 +00:00
Jonas Maebe
8d19bb12a2 * moved sleb/uleb128 helpers to cutils and use SarInt64() intrinsic (based on
patch by J. Gareth Moreton, mantis #35327)

git-svn-id: trunk@41917 -
2019-04-21 10:07:42 +00:00
Jonas Maebe
d150869dea * record symbols that need to remain in their original order, and on Darwin
pass them to the linker so it does not reorder them
   o fixes resource strings on Darwin when using LTO (this used to reorder the
     resource string symbols, so they no longer all appeared between the START
     and END symbols for their compilation module)

git-svn-id: trunk@41907 -
2019-04-20 18:18:10 +00:00
Jonas Maebe
33d57ac646 * replaced TCmdStrListItem getter function with a property
git-svn-id: trunk@41906 -
2019-04-20 18:18:07 +00:00
Jonas Maebe
0225a3a39a * ppudump: fixed reading of ibresource section
git-svn-id: trunk@41905 -
2019-04-20 18:18:03 +00:00
Jeppe Johansen
12879adc2f - Adds intrinsics to save/restore SREG when disabling interrupts.
- Adds nostackframe to stack frame investigation stubs.

git-svn-id: trunk@41898 -
2019-04-18 18:26:51 +00:00
pierre
ec76e879c9 Integrate patch from bug report 35409.
Add possibiliy to throw InternalError
  for unhandled case values inside tentryfile,
  But avoid adding dependency on verbose unit
  as this would break ppudump handling of ppu files.

  Add RaiseAssertion virtual method to tentryfile class.
  Call RaiseAssertion in tentryfile methods
  where an internal error is wanted.
  Override RaiseAssertion method in symtype.pas unit
  to call InternalError.
  Add new class tppudumpfile to override RaiseAssertion
  in utils/ppuutils/ppudump.pp unit.

git-svn-id: trunk@41896 -
2019-04-18 14:08:03 +00:00
Jonas Maebe
b9ddddf9b1 * use ".set" for aliasing global symbols on Darwin, instead of declaring
symbols after each other
   o removed the .reference hack that was used previously

git-svn-id: trunk@41885 -
2019-04-16 16:11:54 +00:00
Jonas Maebe
e008785152 * insert the hidden parameters for objectdef methods after resolving
overrides but before generating the VMT, so that these hidden parameters
    are part of the procdefs stored in the VMT (fixes some LLVM type errors
    after r41716)

git-svn-id: trunk@41884 -
2019-04-16 16:11:50 +00:00
Jeppe Johansen
44beea91b5 - Fix UTX* optimizations that didn't consider the optional ROR parameter.
git-svn-id: trunk@41880 -
2019-04-15 21:52:55 +00:00
Jeppe Johansen
53542b7c5e - Port RISC-V64 startup code to native inline routines.
git-svn-id: trunk@41871 -
2019-04-14 23:36:08 +00:00
Jeppe Johansen
2b78a8fd3d - Add support for .option directive in riscv assembler.
- Use addiw when adjusting U32 to S32

git-svn-id: trunk@41870 -
2019-04-14 20:51:29 +00:00
svenbarth
e6add40495 * fix for Mantis #35348: correctly handle symbols that aren't parameter types (e.g. default values)
+ added test

git-svn-id: trunk@41869 -
2019-04-14 20:47:47 +00:00
svenbarth
c147debda1 * ensure that the correct amount of parameters is used for an operator overload (this is essentially important for unary operators that were declared with two arguments)
git-svn-id: trunk@41868 -
2019-04-14 20:47:43 +00:00
Jonas Maebe
349bb2ff38 * check CurrentPPULongVersion in ppumove
git-svn-id: trunk@41866 -
2019-04-13 15:12:09 +00:00
Jonas Maebe
927fbc4387 * documented usage of ppuversion and ppulongversion
git-svn-id: trunk@41865 -
2019-04-13 14:58:15 +00:00
Jonas Maebe
1b0b81f714 * hopefully fix fpu emulation ppu header flag check after r41846
git-svn-id: trunk@41847 -
2019-04-07 17:10:49 +00:00