mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 07:05:59 +02:00
* 8086: More fixes for Ofs() handling.
git-svn-id: trunk@46478 -
This commit is contained in:
parent
2186846ab1
commit
e4b717c817
@ -71,10 +71,7 @@ implementation
|
||||
if resultdef.typ<>procvardef then
|
||||
internalerror(2018040401);
|
||||
if po_far in tprocvardef(resultdef).procoptions then
|
||||
begin
|
||||
resultdef:=cprocvardef.getreusableprocaddr(tabstractprocdef(left.resultdef),pc_offset);
|
||||
exclude(tprocvardef(resultdef).procoptions,po_far);
|
||||
end;
|
||||
resultdef:=cprocvardef.getreusableprocaddr(tabstractprocdef(left.resultdef),pc_offset);
|
||||
end
|
||||
else if (tcnf_proc_2_procvar_2_voidpointer in convnodeflags) and
|
||||
(current_settings.x86memorymodel in x86_far_code_models) then
|
||||
@ -82,10 +79,7 @@ implementation
|
||||
if resultdef.typ<>procvardef then
|
||||
internalerror(2018040402);
|
||||
if not (po_far in tprocvardef(resultdef).procoptions) then
|
||||
begin
|
||||
resultdef:=cprocvardef.getreusableprocaddr(tabstractprocdef(left.resultdef),pc_far_address);
|
||||
include(tprocvardef(resultdef).procoptions,po_far);
|
||||
end;
|
||||
resultdef:=cprocvardef.getreusableprocaddr(tabstractprocdef(left.resultdef),pc_far_address);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -271,6 +271,28 @@ implementation
|
||||
result:=(p.typ=pointerdef) and (tcpupointerdef(p).x86pointertyp=x86pt_huge);
|
||||
end;
|
||||
|
||||
procedure handle_procdef_copyas(src: tabstractprocdef; is_far: boolean; copytyp:tproccopytyp; var result: tabstractprocdef);
|
||||
begin
|
||||
if is_far then
|
||||
include(result.procoptions,po_far)
|
||||
else
|
||||
exclude(result.procoptions,po_far);
|
||||
case copytyp of
|
||||
pc_far_address:
|
||||
begin
|
||||
include(result.procoptions,po_addressonly);
|
||||
include(result.procoptions,po_far);
|
||||
end;
|
||||
pc_offset:
|
||||
begin
|
||||
include(result.procoptions,po_addressonly);
|
||||
exclude(result.procoptions,po_far);
|
||||
end;
|
||||
else
|
||||
; {none}
|
||||
end;
|
||||
end;
|
||||
|
||||
{****************************************************************************
|
||||
tcpuclassrefdef
|
||||
****************************************************************************}
|
||||
@ -337,10 +359,7 @@ implementation
|
||||
function tcpuprocdef.getcopyas(newtyp:tdeftyp;copytyp:tproccopytyp;const paraprefix:string):tstoreddef;
|
||||
begin
|
||||
result:=inherited;
|
||||
if is_far then
|
||||
include(tabstractprocdef(result).procoptions,po_far)
|
||||
else
|
||||
exclude(tabstractprocdef(result).procoptions,po_far);
|
||||
handle_procdef_copyas(self,is_far,copytyp,tabstractprocdef(result));
|
||||
end;
|
||||
|
||||
|
||||
@ -431,10 +450,7 @@ implementation
|
||||
function tcpuprocvardef.getcopyas(newtyp:tdeftyp;copytyp:tproccopytyp;const paraprefix:string):tstoreddef;
|
||||
begin
|
||||
result:=inherited;
|
||||
if is_far then
|
||||
include(tabstractprocdef(result).procoptions,po_far)
|
||||
else
|
||||
exclude(tabstractprocdef(result).procoptions,po_far);
|
||||
handle_procdef_copyas(self,is_far,copytyp,tabstractprocdef(result));
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user