* try to avoid to use pic based calls

git-svn-id: trunk@43054 -
This commit is contained in:
florian 2019-09-22 15:27:50 +00:00
parent 64e846ebe9
commit 02deb7d954

View File

@ -1117,6 +1117,11 @@ implementation
name_to_call:=tprocdef(procdefinition).mangledname;
if cnf_inherited in callnodeflags then
retloc:=hlcg.a_call_name_inherited(current_asmdata.CurrAsmList,tprocdef(procdefinition),name_to_call,paralocs)
{ under certain conditions, a static call (i.e. without PIC) can be generated }
else if ((procdefinition.owner=current_procinfo.procdef.owner) or
(procdefinition.owner.symtabletype in [localsymtable,staticsymtable])
) and ((procdefinition.procoptions*[po_weakexternal,po_external])=[]) then
retloc:=hlcg.a_call_name_static(current_asmdata.CurrAsmList,tprocdef(procdefinition),name_to_call,paralocs,typedef)
else
retloc:=hlcg.a_call_name(current_asmdata.CurrAsmList,tprocdef(procdefinition),name_to_call,paralocs,typedef,po_weakexternal in procdefinition.procoptions);
extra_post_call_code;