* override gen_stack_check_size_para() and gen_stack_check_call()

for llvm and do nothing (see comments in the code)

git-svn-id: trunk@33991 -
This commit is contained in:
Jonas Maebe 2016-06-15 18:31:58 +00:00
parent 98ac6c4797
commit 5313db710b

View File

@ -131,6 +131,8 @@ uses
procedure g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint); override;
procedure g_adjust_self_value(list: TAsmList; procdef: tprocdef; ioffset: aint); override;
procedure g_local_unwind(list: TAsmList; l: TAsmLabel); override;
procedure gen_stack_check_size_para(list: TAsmList); override;
procedure gen_stack_check_call(list: TAsmList); override;
procedure varsym_set_localloc(list: TAsmList; vs: tabstractnormalvarsym); override;
procedure paravarsym_set_initialloc_to_paraloc(vs: tparavarsym); override;
@ -1652,6 +1654,25 @@ implementation
end;
procedure thlcgllvm.gen_stack_check_size_para(list: TAsmList);
begin
{ this is implemented in a very hackish way, whereby first the call
to fpc_stackcheck() is emitted, then the prolog is generated and
registers are allocated, and finally the code to load the parameter
is inserted before the call to fpc_stackcheck(). Since parameters are
explicitly passed to call instructions for llvm, that does not work
here. It could be solved by patching the call instruction later, but
that's a lot of engineering for functionality that's only marginally
useful at best.
end;
procedure thlcgllvm.gen_stack_check_call(list: TAsmList);
begin
{ see explanation in thlcgllvm.gen_stack_check_size_para() }
end;
function thlcgllvm.make_simple_ref(list: TAsmList; const ref: treference; def: tdef): treference;
begin
result:=make_simple_ref_ptr(list,ref,cpointerdef.create(def));