Browse Source

* fixed type of proc address when loading a complex procvar

git-svn-id: trunk@32413 -
Jonas Maebe 9 years ago
parent
commit
a3cdf466e3
1 changed files with 2 additions and 2 deletions
  1. 2 2
      compiler/ncgld.pas

+ 2 - 2
compiler/ncgld.pas

@@ -534,14 +534,14 @@ implementation
                          { load method address }
                          { load method address }
                          hlcg.reference_reset_base(href,voidpointertype,hregister,tobjectdef(procdef.struct).vmtmethodoffset(procdef.extnumber),voidpointertype.alignment);
                          hlcg.reference_reset_base(href,voidpointertype,hregister,tobjectdef(procdef.struct).vmtmethodoffset(procdef.extnumber),voidpointertype.alignment);
                          location.register:=hlcg.getaddressregister(current_asmdata.CurrAsmList,procdef.address_type);
                          location.register:=hlcg.getaddressregister(current_asmdata.CurrAsmList,procdef.address_type);
-                         hlcg.a_load_ref_reg(current_asmdata.CurrAsmList,procdef.address_type,procdef.address_type,href,location.register);
+                         hlcg.a_load_ref_reg(current_asmdata.CurrAsmList,procdef.address_type,cprocvardef.getreusableprocaddr(procdef),href,location.register);
                        end
                        end
                      else
                      else
                        begin
                        begin
                          { load address of the function }
                          { load address of the function }
                          reference_reset_symbol(href,current_asmdata.RefAsmSymbol(procdef.mangledname),0,procdef.address_type.alignment);
                          reference_reset_symbol(href,current_asmdata.RefAsmSymbol(procdef.mangledname),0,procdef.address_type.alignment);
                          location.register:=hlcg.getaddressregister(current_asmdata.CurrAsmList,procdef.address_type);
                          location.register:=hlcg.getaddressregister(current_asmdata.CurrAsmList,procdef.address_type);
-                         hlcg.a_loadaddr_ref_reg(current_asmdata.CurrAsmList,procdef,procdef.address_type,href,location.register);
+                         hlcg.a_loadaddr_ref_reg(current_asmdata.CurrAsmList,procdef,cprocvardef.getreusableprocaddr(procdef),href,location.register);
                        end;
                        end;
 
 
                      { to get methodpointers stored correctly, code and self register must be swapped on
                      { to get methodpointers stored correctly, code and self register must be swapped on