mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 17:19:19 +02:00
+ support for get_frame() for the LLVM target (using the llvm.frameaddress()
intrinsic) git-svn-id: trunk@31409 -
This commit is contained in:
parent
be9d2b1c26
commit
677595880a
@ -26,10 +26,14 @@ unit nllvminl;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
|
node,
|
||||||
ncginl;
|
ncginl;
|
||||||
|
|
||||||
type
|
type
|
||||||
tllvminlinenode = class(tcginlinenode)
|
tllvminlinenode = class(tcginlinenode)
|
||||||
|
protected
|
||||||
|
function first_get_frame: tnode; override;
|
||||||
|
public
|
||||||
procedure second_length; override;
|
procedure second_length; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -37,12 +41,20 @@ interface
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
verbose,globtype,
|
verbose,globtype,constexp,
|
||||||
aasmbase, aasmdata,
|
aasmbase, aasmdata,
|
||||||
symtype,symdef,defutil,
|
symtype,symdef,defutil,
|
||||||
ninl,
|
ncal,ncon,ninl,
|
||||||
pass_2,
|
pass_2,
|
||||||
cgbase,cgutils,tgobj,hlcgobj;
|
cgbase,cgutils,tgobj,hlcgobj,
|
||||||
|
cpubase;
|
||||||
|
|
||||||
|
|
||||||
|
function tllvminlinenode.first_get_frame: tnode;
|
||||||
|
begin
|
||||||
|
result:=ccallnode.createintern('llvm_frameaddress',
|
||||||
|
ccallparanode.create(genintconstnode(0),nil));
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tllvminlinenode.second_length;
|
procedure tllvminlinenode.second_length;
|
||||||
|
@ -16,3 +16,4 @@
|
|||||||
|
|
||||||
procedure llvm_memcpy64(dest, source: pointer; len: qword; align: cardinal; isvolatile: boolean); compilerproc; external name 'llvm.memcpy.p0i8.p0i8.i64';
|
procedure llvm_memcpy64(dest, source: pointer; len: qword; align: cardinal; isvolatile: boolean); compilerproc; external name 'llvm.memcpy.p0i8.p0i8.i64';
|
||||||
|
|
||||||
|
function llvm_frameaddress(level: longint): pointer; compilerproc; external name 'llvm.frameaddress';
|
||||||
|
Loading…
Reference in New Issue
Block a user