+ support for get_frame() for the LLVM target (using the llvm.frameaddress()

intrinsic)

git-svn-id: trunk@31409 -
This commit is contained in:
Jonas Maebe 2015-08-24 22:07:03 +00:00
parent be9d2b1c26
commit 677595880a
2 changed files with 16 additions and 3 deletions
compiler/llvm
rtl/inc

View File

@ -26,10 +26,14 @@ unit nllvminl;
interface
uses
node,
ncginl;
type
tllvminlinenode = class(tcginlinenode)
protected
function first_get_frame: tnode; override;
public
procedure second_length; override;
end;
@ -37,12 +41,20 @@ interface
implementation
uses
verbose,globtype,
verbose,globtype,constexp,
aasmbase, aasmdata,
symtype,symdef,defutil,
ninl,
ncal,ncon,ninl,
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;

View File

@ -16,3 +16,4 @@
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';