Commit Graph

9 Commits

Author SHA1 Message Date
Jonas Maebe
e720a1f306 * moved tcgexceptionstatehandler to a new cgexcept unit
* fixed llvm cycle by overriding additional eh-related tcgprocinfo methods

git-svn-id: branches/debug_eh@41519 -
2019-02-27 21:13:45 +00:00
Jonas Maebe
5cb5b10f8d * fixed LLVM and non-i386 compilation
git-svn-id: branches/debug_eh@41423 -
2019-02-23 17:03:42 +00:00
florian
65aebd22b0 + initial implementation of dwarf/eh_frame based exception handling for i386-linux, basic stuff works, open todos
* nested exception handling statments in one procedure need to be fixed
  * clean up, finally factor out tcgprocinfo from psub at least
  * extensive testing

git-svn-id: branches/debug_eh@41289 -
2019-02-10 18:07:33 +00:00
Jonas Maebe
7aa6a2ec81 * only make a copy of the finally code in pass_1 instead of in pass_typecheck,
to avoid an internalerror in case the finally code contains a goto outside
    the finally code (tbf/tb0209.pp)

git-svn-id: branches/debug_eh@41209 -
2019-02-03 21:09:51 +00:00
Jonas Maebe
9f928b2805 * fix exception handling code generator memory leaks
git-svn-id: branches/debug_eh@40734 -
2019-01-01 16:24:42 +00:00
Jonas Maebe
df0a126064 * abstracted rest of the generic exception handling code through the
texceptionstatehandler class + llvm overrides
  + added FPC_DummyPotentialRaise routine that gets called at the begin and end
    of try-blocks to be able to catch hardware exceptions to a limited extent
    with LLVM

git-svn-id: branches/debug_eh@40418 -
2018-11-29 21:31:40 +00:00
Jonas Maebe
7ffd5fc90b * handle explicit reraise for llvm specifically, as it needs to unwind to
the parent exception frame (-> pop current exception label, invoke/call
    reraise, push current exception label again)

git-svn-id: branches/debug_eh@40417 -
2018-11-29 21:31:37 +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
48ef33a8b3 * fixed interprocedural gotos for llvm
o ensure that the label's local "jumpbuf" variable gets moved to the
     parentfpstruct soon enough
   o don't generate global symbols for interprocedural labels: they're not
     necessary if they are only used via setjmp/longjmp (all references are
     local in that case), and if they are referenced via an assembler block
     then we'll have to handle them by passing a blockaddress() expression
     as parameter to that assembler block (which does not require a global
     symbol, but which is not yet implemented)

git-svn-id: trunk@34946 -
2016-11-21 07:39:13 +00:00