Commit Graph

54709 Commits

Author SHA1 Message Date
Jonas Maebe
03013cf2e1 * make ttryfinallynode inherit from ttertiary node so it has a "third" node
member. This one will be used by the LLVM descendent to keep a copy of
    the finally code, as it must use a separate version for the code that
    gets executed when an exception is caught and when no exception happens

git-svn-id: branches/debug_eh@40416 -
2018-11-29 21:31:34 +00:00
Jonas Maebe
2f8fcf7819 + new tf_use_psabieh target flag to indicate a target uses PSABI/Dwarf EH
o use this flag to set the personality routine of a function if it uses
     exception handlinga
   o also define FPC_USE_PSABIEH if this target flag is set
   o set this target flag for darwin/x86-64 if the compiler is compiled with
     -dllvm

git-svn-id: branches/debug_eh@40415 -
2018-11-29 21:31:30 +00:00
Jonas Maebe
fceb34dbd5 * converted tllvmpara contents from tlocation to toper, so we can also
store tai in them
  + support for direct symbol parameters to llvm routines (without first
    loading them into register)
   o needed to pass such symbols to llvm intrinsics

git-svn-id: branches/debug_eh@40414 -
2018-11-29 21:31:27 +00:00
Jonas Maebe
d363acbe77 * when inserting a reference to an external procdef, also process its
parameter types in case it hasn't been called (because in that case
    the defs of those parameters won't have been used and hence they
    won't have been recorded for writing either)

git-svn-id: branches/debug_eh@40413 -
2018-11-29 21:31:24 +00:00
Jonas Maebe
ae65f88f62 * add support for la_catch in spilling_get_reg_type (it will never need
spilling, but we may need the type to insert bitcasts)
  * load the la_catch symbol operand with loadref instead of loadsymbol,
    as the latter sets refaddr_full and with llvm we use that to indicated
    symbol names of named registers rather than data symbols (which in turn
    prevents it from being processed for inserting bitcasts if necessary)

git-svn-id: branches/debug_eh@40412 -
2018-11-29 21:31:21 +00:00
Jonas Maebe
ce7579bd50 + added "cleanup" landing pad opcode
git-svn-id: branches/debug_eh@40411 -
2018-11-29 21:31:18 +00:00
Jonas Maebe
4cd6f59bc3 * changed create_hlcodegen into a procvar, so that we don't have to insert
hlcgllvm in the uses clause of every unit that calls create_hlcodegen
   o prevents dependency cycles that can cause llvm codegen units to init
     before the cpu variants, which is bad since the llvm versions have to
     override the cpu variants in their init code (+ added checks in the
     init code that they are in fact initialised later)

git-svn-id: branches/debug_eh@40410 -
2018-11-29 21:31:15 +00:00
Jonas Maebe
366bf4294b * constructor to create extractvalue/extractelement instructions
git-svn-id: branches/debug_eh@40409 -
2018-11-29 21:31:11 +00:00
Jonas Maebe
e6c89bbf0a + helper to add an extra clause to a landingpad instruction
git-svn-id: branches/debug_eh@40408 -
2018-11-29 21:31:08 +00:00
Jonas Maebe
4e73919676 - removed FPC 2.6.x bootstrapping code
git-svn-id: branches/debug_eh@40407 -
2018-11-29 21:31:05 +00:00
Jonas Maebe
01ddde2283 * refactored jumping out of exception frames so it can be overridden by descendents
git-svn-id: branches/debug_eh@40406 -
2018-11-29 21:31:02 +00:00
Jonas Maebe
ccb7231744 * generate invoke instead of call when calling a function in a block that
catches exceptions

git-svn-id: branches/debug_eh@40405 -
2018-11-29 21:30:59 +00:00
Jonas Maebe
8711069998 + constructors to create invoke instructions
git-svn-id: branches/debug_eh@40404 -
2018-11-29 21:30:56 +00:00
Jonas Maebe
077d7e8551 * fixed handling of LLVM invoke instruction in the assembler writer and
type inference

git-svn-id: branches/debug_eh@40403 -
2018-11-29 21:30:53 +00:00
Jonas Maebe
5b8f7224af * set the dummy exception handling personality function for functions using
exceptions for LLVM (except on Windows targets, since they (will) use
    their own kind of exception handling)
   o ensure we generate an external function symbol definition for such
     personality functions on LLVM

git-svn-id: branches/debug_eh@40402 -
2018-11-29 21:30:49 +00:00
Jonas Maebe
b6efcb9105 + tllvmexceptionstatehandler that emits LLVM landingpad instructions to be
referred by invoke instructions in exception catching blocks
   o for now we won't actually use ABI-compliant exception handling, but we
     need invoke/landingpad combinations for LLVM's control flow analyses to
     correctly handle code involving exception handling

git-svn-id: branches/debug_eh@40401 -
2018-11-29 21:30:46 +00:00
Jonas Maebe
3cfad8fba8 * renamed FPC_USE_PSEABIEH to FPC_USE_PSABIEH
git-svn-id: branches/debug_eh@40400 -
2018-11-29 21:30:42 +00:00
Jonas Maebe
bc8ed77af1 * synchronised with trunk till r40398
git-svn-id: branches/debug_eh@40399 -
2018-11-29 21:19:12 +00:00
Jonas Maebe
50ab607676 + customint torddef type to create arbitraty bit-width integers
o use this to handle non-power-of-two-sized parameters for llvm
   o no general support in the parser/code generator, so don't expose

git-svn-id: trunk@40398 -
2018-11-29 20:57:08 +00:00
pierre
a1fbde242d Fix cleaning of unicode utils package in fpmake
git-svn-id: trunk@40397 -
2018-11-29 16:55:07 +00:00
michael
f051e1b8dc * Add Payload event
git-svn-id: trunk@40396 -
2018-11-29 15:42:06 +00:00
michael
a49c17fb7d * Allow redirect to local URL (patch by Michal GawRycki, bug ID #34595)
git-svn-id: trunk@40395 -
2018-11-29 15:37:16 +00:00
michael
090141a69c * Allow to retrieve argument size, patch by Silvio Clecio (bug ID 34611)
git-svn-id: trunk@40394 -
2018-11-29 15:34:00 +00:00
michael
818624559d * Fix bug #34538, AV in case of invalid method (patch by chmod222)
git-svn-id: trunk@40393 -
2018-11-29 15:21:50 +00:00
pierre
810b37a877 Fix delete of gdbver.inc generated file after gdbint unit compilation when called from packages level
git-svn-id: trunk@40392 -
2018-11-29 14:23:44 +00:00
pierre
101ce4d37b Add several missing unit references in fpmake files
git-svn-id: trunk@40391 -
2018-11-28 23:45:35 +00:00
pierre
9f68bddf3b Document -d --debug option, and change short version of --doc-folder to -df as -d is already used by debug option
git-svn-id: trunk@40390 -
2018-11-28 23:24:33 +00:00
pierre
8db29007ff Add listing of unremoved files during clean with -d (vlDebug) option
git-svn-id: trunk@40389 -
2018-11-28 23:16:31 +00:00
pierre
ddcd46b4be * Change "Clean of package %S completed" level from vlWarning to vlInfo,
to be at same level as "Cleaning pacakge %s" message.
  * Transform "Searching dir" writeln in SearchFiles into a vlDebug level log call.
  + Add manifest.xml to the list of files to remove.
  * Only do something in TBuildEngine.Clean method if AllTargets is true
    or if CPU-OS is supported for APackage parameter.

git-svn-id: trunk@40388 -
2018-11-28 22:11:29 +00:00
Jonas Maebe
c97c6d3171 * synchronised with trunk till r40386
git-svn-id: branches/debug_eh@40387 -
2018-11-28 19:24:42 +00:00
Jonas Maebe
63847f1948 * disable explicitly calling class constructors on the JVM platform, as that
is forbidden there

git-svn-id: trunk@40386 -
2018-11-28 19:23:34 +00:00
Jonas Maebe
026d06cffb - reverted r39188, as this hack removes the type correctness of the
instructions, which breaks the llvm code generator. Put such hacks
    in CPU-specific overrides

git-svn-id: trunk@40385 -
2018-11-28 19:23:31 +00:00
Jonas Maebe
3a5a69619e * moved initialisation of parentfpstruct to just behind where the local vars
get initialised, so that parameters in this struct are already available
    in any wrappers generated for the parent routine (e.g. in case self is
    moved to the parentfpstruct in a destructor, which calls beforestruction
    in its wrapper)

git-svn-id: trunk@40384 -
2018-11-28 19:23:28 +00:00
Jonas Maebe
97b40dc16d * fixed dynamic array constants for llvm
git-svn-id: trunk@40383 -
2018-11-28 19:23:25 +00:00
Jonas Maebe
413a3599c1 * thlcgobj.g_unreachable() dummy implementation + llvm override
git-svn-id: trunk@40382 -
2018-11-28 19:23:22 +00:00
pierre
d315e30d5b Fix i386-aros in fpmkunit
git-svn-id: trunk@40381 -
2018-11-28 16:47:43 +00:00
pierre
0e996ba652 Add mising disclean help, rephrase help for Clean also
git-svn-id: trunk@40380 -
2018-11-28 14:03:45 +00:00
Jonas Maebe
cf235a36a1 * synchronised with trunk till r40378
git-svn-id: branches/debug_eh@40379 -
2018-11-27 20:11:49 +00:00
pierre
b64e9700aa Avoid range errors or overflows on for AVR cpu, when computing address offsets
git-svn-id: trunk@40378 -
2018-11-27 10:21:37 +00:00
pierre
044fae62ea Fix bug report 34605 and add corresponding test
git-svn-id: trunk@40377 -
2018-11-27 10:19:36 +00:00
Jonas Maebe
20fea3607c * pass volatility information to llvm.memcpy
git-svn-id: trunk@40376 -
2018-11-26 22:30:05 +00:00
Jonas Maebe
09b6306f02 - removed outdated comment after r40373
git-svn-id: trunk@40375 -
2018-11-26 22:30:01 +00:00
Jonas Maebe
f98a9bea3c * cap the assumed alignment of pass-by-reference parameters to the minimum of
their default alignment, the alignment of locals, globals and constants
    (so that we don't overestimate the alignment of global normal set
     constants to 32 bytes, while the maximum const alignment is often only
     8 bytes)

git-svn-id: trunk@40374 -
2018-11-26 22:27:35 +00:00
Jonas Maebe
9a157a7749 * don't overwrite the alignment of locals set by the temp manager with the
standard alignment for the type (the maximum alignment for locals may
    be less, and it's set correctly by the temp manager)

git-svn-id: trunk@40373 -
2018-11-26 22:27:31 +00:00
Mattias Gaertner
9f7f43673f pastojs: added built-in procedure debugger
git-svn-id: trunk@40372 -
2018-11-26 09:36:02 +00:00
pierre
c46aa0ecb5 + Add new string SWarnRemoveNonEmptyDirectory
* Change SWarnUnregisteredResource into a debug string
  + Use ExcludeTrailingDelimiter to be sure to get the parent directory in Clean method.
  + Add call to CmdRemoveTrees if CmdRemmoveDirs fails in Clean method,
    but only if dir name if $FPCTARGET

git-svn-id: trunk@40371 -
2018-11-25 21:24:16 +00:00
Jonas Maebe
b2608ba02a + fpc_reraise and fpc_raise_nested implementations for psabieh
git-svn-id: branches/debug_eh@40370 -
2018-11-25 21:05:55 +00:00
Jonas Maebe
9c5a62351d * more -dexcdebug output
o also fixed _Unwind_RaiseException declaration (function rather than
     procedure)

git-svn-id: branches/debug_eh@40369 -
2018-11-25 21:05:51 +00:00
Jonas Maebe
8153aa1d00 * fixed frames memory leak when freeing an exception with psabieh
git-svn-id: branches/debug_eh@40368 -
2018-11-25 21:05:47 +00:00
Jonas Maebe
a7cb99f012 * when transforming the structure of a node tree involving full boolean
evaluation flags, also move the full boolean evaluation flags

git-svn-id: trunk@40367 -
2018-11-25 20:56:58 +00:00