mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 12:49:33 +02:00
* Changed tabstractprocdef.address_size to return the def, which can be used to get other properties like size and alignment. Removes one of i8086 ifdef's.
git-svn-id: trunk@26664 -
This commit is contained in:
parent
53556f529d
commit
7104157a57
@ -778,15 +778,8 @@ implementation
|
||||
regs_to_save_fpu:=paramanager.get_volatile_registers_fpu(procdefinition.proccalloption);
|
||||
regs_to_save_mm:=paramanager.get_volatile_registers_mm(procdefinition.proccalloption);
|
||||
|
||||
proc_addr_size:=int_cgsize(procdefinition.address_size);
|
||||
{$ifdef i8086}
|
||||
if po_far in procdefinition.procoptions then
|
||||
proc_addr_voidptrdef:=voidfarpointertype
|
||||
else
|
||||
proc_addr_voidptrdef:=voidnearpointertype;
|
||||
{$else i8086}
|
||||
proc_addr_voidptrdef:=voidpointertype;
|
||||
{$endif i8086}
|
||||
proc_addr_voidptrdef:=procdefinition.address_type;
|
||||
proc_addr_size:=def_cgsize(proc_addr_voidptrdef);
|
||||
|
||||
{ Include Function result registers }
|
||||
if (not is_void(resultdef)) then
|
||||
@ -890,7 +883,7 @@ implementation
|
||||
wpoinfomanager.symbol_live(current_procinfo.procdef.mangledname)) then
|
||||
tobjectdef(tprocdef(procdefinition).struct).register_vmt_call(tprocdef(procdefinition).extnumber);
|
||||
|
||||
reference_reset_base(href,vmtreg,vmtoffset,procdefinition.address_size);
|
||||
reference_reset_base(href,vmtreg,vmtoffset,proc_addr_voidptrdef.alignment);
|
||||
{$ifndef x86}
|
||||
pvreg:=cg.getintregister(current_asmdata.CurrAsmList,proc_addr_size);
|
||||
cg.a_load_ref_reg(current_asmdata.CurrAsmList,proc_addr_size,proc_addr_size,href,pvreg);
|
||||
|
@ -546,7 +546,7 @@ interface
|
||||
procedure init_paraloc_info(side: tcallercallee);
|
||||
function stack_tainting_parameter(side: tcallercallee): boolean;
|
||||
function is_pushleftright: boolean;
|
||||
function address_size:asizeint;
|
||||
function address_type:tdef;
|
||||
private
|
||||
procedure count_para(p:TObject;arg:pointer);
|
||||
procedure insert_para(p:TObject;arg:pointer);
|
||||
@ -4506,14 +4506,16 @@ implementation
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
function tabstractprocdef.address_size: asizeint;
|
||||
function tabstractprocdef.address_type: tdef;
|
||||
begin
|
||||
{$ifdef i8086}
|
||||
if po_far in procoptions then
|
||||
result:=sizeof(pint)+2
|
||||
result:=voidfarpointertype
|
||||
else
|
||||
result:=voidnearpointertype;
|
||||
{$else i8086}
|
||||
result:=voidpointertype;
|
||||
{$endif i8086}
|
||||
result:=sizeof(pint);
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user