mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 09:19:23 +02:00
* fixed LLVM and non-i386 compilation
git-svn-id: branches/debug_eh@41423 -
This commit is contained in:
parent
8db9b211d5
commit
5cb5b10f8d
@ -47,13 +47,15 @@ interface
|
|||||||
procedure pushlandingpad(pad: taillvm);
|
procedure pushlandingpad(pad: taillvm);
|
||||||
procedure poppad;
|
procedure poppad;
|
||||||
function currlandingpad: taillvm;
|
function currlandingpad: taillvm;
|
||||||
|
procedure setup_eh; override;
|
||||||
|
procedure finish_eh; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
globtype,globals,verbose,systems,
|
globtype,globals,verbose,systems,
|
||||||
symtable;
|
symconst,symtable;
|
||||||
|
|
||||||
|
|
||||||
constructor tllvmprocinfo.create(aparent: tprocinfo);
|
constructor tllvmprocinfo.create(aparent: tprocinfo);
|
||||||
@ -119,6 +121,20 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure tllvmprocinfo.setup_eh;
|
||||||
|
begin
|
||||||
|
if po_assembler in procdef.procoptions then
|
||||||
|
inherited;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure tllvmprocinfo.finish_eh;
|
||||||
|
begin
|
||||||
|
if po_assembler in procdef.procoptions then
|
||||||
|
inherited;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if not assigned(cprocinfo) then
|
if not assigned(cprocinfo) then
|
||||||
begin
|
begin
|
||||||
|
@ -41,7 +41,7 @@ interface
|
|||||||
class procedure get_exception_temps(list: TAsmList; var t: texceptiontemps); override;
|
class procedure get_exception_temps(list: TAsmList; var t: texceptiontemps); override;
|
||||||
class procedure unget_exception_temps(list: TAsmList; const t: texceptiontemps); override;
|
class procedure unget_exception_temps(list: TAsmList; const t: texceptiontemps); override;
|
||||||
class procedure new_exception(list: TAsmList; const t: texceptiontemps; const exceptframekind: texceptframekind; out exceptstate: texceptionstate); override;
|
class procedure new_exception(list: TAsmList; const t: texceptiontemps; const exceptframekind: texceptframekind; out exceptstate: texceptionstate); override;
|
||||||
class procedure emit_except_label(list: TAsmList; exceptframekind: texceptframekind; var exceptionstate: texceptionstate); override;
|
class procedure emit_except_label(list: TAsmList; exceptframekind: texceptframekind; var exceptionstate: texceptionstate;var exceptiontemps:texceptiontemps); override;
|
||||||
class procedure end_try_block(list: TAsmList; exceptframekind: texceptframekind; const t: texceptiontemps; var exceptionstate: texceptionstate; endlabel: TAsmLabel); override;
|
class procedure end_try_block(list: TAsmList; exceptframekind: texceptframekind; const t: texceptiontemps; var exceptionstate: texceptionstate; endlabel: TAsmLabel); override;
|
||||||
class procedure cleanupobjectstack(list: TAsmList); override;
|
class procedure cleanupobjectstack(list: TAsmList); override;
|
||||||
class procedure popaddrstack(list: TAsmList); override;
|
class procedure popaddrstack(list: TAsmList); override;
|
||||||
@ -167,7 +167,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
class procedure tllvmexceptionstatehandler.emit_except_label(list: TAsmList; exceptframekind: texceptframekind; var exceptionstate: texceptionstate);
|
class procedure tllvmexceptionstatehandler.emit_except_label(list: TAsmList; exceptframekind: texceptframekind; var exceptionstate: texceptionstate;var exceptiontemps:texceptiontemps);
|
||||||
var
|
var
|
||||||
reg: tregister;
|
reg: tregister;
|
||||||
landingpad: taillvm;
|
landingpad: taillvm;
|
||||||
|
@ -1205,6 +1205,7 @@ procedure fpc_ReRaise; [public,alias:'FPC_RERAISE']; compilerproc;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{$if defined(cpui386) and not defined(cpullvm)}
|
||||||
{$define FPC_SYSTEM_HAS_RESUME}
|
{$define FPC_SYSTEM_HAS_RESUME}
|
||||||
procedure fpc_Resume(exception_object: PFPC_Unwind_Exception); [public,alias:'FPC_RESUME']; compilerproc; assembler; nostackframe;
|
procedure fpc_Resume(exception_object: PFPC_Unwind_Exception); [public,alias:'FPC_RESUME']; compilerproc; assembler; nostackframe;
|
||||||
asm
|
asm
|
||||||
@ -1213,7 +1214,7 @@ procedure fpc_Resume(exception_object: PFPC_Unwind_Exception); [public,alias:'FP
|
|||||||
pushl %ecx
|
pushl %ecx
|
||||||
jmp _Unwind_Resume
|
jmp _Unwind_Resume
|
||||||
end;
|
end;
|
||||||
|
{$endif}
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_RAISENESTED}
|
{$define FPC_SYSTEM_HAS_RAISENESTED}
|
||||||
procedure fpc_raise_nested;compilerproc;
|
procedure fpc_raise_nested;compilerproc;
|
||||||
|
@ -80,7 +80,9 @@ function _FPC_psabieh_personality_v0(version: longint; actions: FPC_Unwind_Actio
|
|||||||
{$endif}
|
{$endif}
|
||||||
function FPC_psabi_begin_catch(exc:PFPC_Unwind_Exception): pointer; cdecl; compilerproc;
|
function FPC_psabi_begin_catch(exc:PFPC_Unwind_Exception): pointer; cdecl; compilerproc;
|
||||||
procedure FPC_psabi_end_catch; cdecl; compilerproc;
|
procedure FPC_psabi_end_catch; cdecl; compilerproc;
|
||||||
|
{$if defined(cpui386) and not defined(cpullvm)}
|
||||||
Procedure fpc_Resume(exception_object: PFPC_Unwind_Exception); compilerproc;
|
Procedure fpc_Resume(exception_object: PFPC_Unwind_Exception); compilerproc;
|
||||||
|
{$endif}
|
||||||
|
|
||||||
{ llvm cannot create a catch/cleanup block if there is no call inside the
|
{ llvm cannot create a catch/cleanup block if there is no call inside the
|
||||||
try block to a routine that can raise an exception. Hence, we will call
|
try block to a routine that can raise an exception. Hence, we will call
|
||||||
|
Loading…
Reference in New Issue
Block a user