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

View File

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