+ introduce po_hasnearfarcallmodel (specifies that the near/far call model was

specified explicitly). This will be useful, when we implement an automatic
  call model selection optimization.

git-svn-id: trunk@38732 -
This commit is contained in:
nickysn 2018-04-11 12:31:09 +00:00
parent dfb0869656
commit 42ebdbe277
2 changed files with 15 additions and 3 deletions

View File

@ -368,13 +368,17 @@ implementation
procedure tcpuprocdef.declared_far;
begin
include(procoptions,po_far);
include(procoptions,po_hasnearfarcallmodel);
end;
procedure tcpuprocdef.declared_near;
begin
if not (cs_huge_code in current_settings.moduleswitches) then
exclude(procoptions,po_far)
begin
exclude(procoptions,po_far);
include(procoptions,po_hasnearfarcallmodel);
end
else
inherited declared_near;
end;
@ -473,7 +477,10 @@ implementation
procedure tcpuprocvardef.declared_far;
begin
if is_addressonly then
include(procoptions,po_far)
begin
include(procoptions,po_far);
include(procoptions,po_hasnearfarcallmodel);
end
else
inherited;
end;
@ -482,7 +489,10 @@ implementation
procedure tcpuprocvardef.declared_near;
begin
if is_addressonly then
exclude(procoptions,po_far)
begin
exclude(procoptions,po_far);
include(procoptions,po_hasnearfarcallmodel);
end
else
inherited;
end;

View File

@ -400,6 +400,8 @@ type
po_auto_raised_visibility,
{ procedure is far (x86 only) }
po_far,
{ near/far call model is specified explicitly (x86 only) }
po_hasnearfarcallmodel,
{ the procedure never returns, this information is usefull for dfa }
po_noreturn,
{ procvar is a function reference }