+ fill the treference segment correctly in the load node for localvarsyms and

paravarsyms that are passed by reference in a i8086 far data memory model

git-svn-id: trunk@27277 -
This commit is contained in:
nickysn 2014-03-25 00:50:18 +00:00
parent 122f66b11a
commit 897802c7c4

View File

@ -454,7 +454,7 @@ implementation
begin
hregister:=hlcg.getaddressregister(current_asmdata.CurrAsmList,voidpointertype);
{ we need to load only an address }
location.size:=OS_ADDR;
location.size:=int_cgsize(voidpointertype.size);
hlcg.a_load_loc_reg(current_asmdata.CurrAsmList,voidpointertype,voidpointertype,location,hregister);
end;
{ assume packed records may always be unaligned }
@ -464,6 +464,10 @@ implementation
else
location_reset_ref(location,LOC_REFERENCE,newsize,1);
location.reference.base:=hregister;
{$ifdef i8086}
if current_settings.x86memorymodel in x86_far_data_models then
location.reference.segment:=GetNextReg(hregister);
{$endif i8086}
end;
{ make const a LOC_CREFERENCE }