Explorar o código

* tcgloadparentfpnode.pass_generate_code converted to the high level code
generator. This fixes nested access to parentfp in i8086 memory models where
DS<>SS.

git-svn-id: trunk@27690 -

nickysn %!s(int64=11) %!d(string=hai) anos
pai
achega
cb33e51425
Modificáronse 1 ficheiros con 4 adicións e 4 borrados
  1. 4 4
      compiler/ncgmem.pas

+ 4 - 4
compiler/ncgmem.pas

@@ -158,8 +158,8 @@ implementation
         else
           begin
             currpi:=current_procinfo;
-            location_reset(location,LOC_REGISTER,OS_ADDR);
-            location.register:=cg.getaddressregister(current_asmdata.CurrAsmList);
+            location_reset(location,LOC_REGISTER,def_cgsize(parentfpvoidpointertype));
+            location.register:=hlcg.getaddressregister(current_asmdata.CurrAsmList,parentfpvoidpointertype);
             { load framepointer of current proc }
             hsym:=tparavarsym(currpi.procdef.parast.Find('parentfp'));
             if not assigned(hsym) then
@@ -178,8 +178,8 @@ implementation
                 if hsym.localloc.loc<>LOC_REFERENCE then
                   internalerror(200309283);
 
-                reference_reset_base(href,location.register,hsym.localloc.reference.offset,sizeof(pint));
-                cg.a_load_ref_reg(current_asmdata.CurrAsmList,OS_ADDR,OS_ADDR,href,location.register);
+                hlcg.reference_reset_base(href,parentfpvoidpointertype,location.register,hsym.localloc.reference.offset,sizeof(pint));
+                hlcg.a_load_ref_reg(current_asmdata.CurrAsmList,parentfpvoidpointertype,parentfpvoidpointertype,href,location.register);
               end;
           end;
       end;