Browse Source

- removed unnecessary dependencies on tprocdef.funcretloc being a tlocation
(has to be changed into a tcgpara to fix the x86-64 abi bugs)

git-svn-id: trunk@15272 -

Jonas Maebe 15 years ago
parent
commit
ca660d409c
2 changed files with 2 additions and 3 deletions
  1. 1 2
      compiler/ncgld.pas
  2. 1 1
      compiler/ncgutil.pas

+ 1 - 2
compiler/ncgld.pas

@@ -173,8 +173,7 @@ implementation
         rr.new := @newref;
         rr.new := @newref;
         rr.ressym := nil;
         rr.ressym := nil;
 
 
-        if (current_procinfo.procdef.funcretloc[calleeside].loc<>LOC_VOID) and
-           assigned(current_procinfo.procdef.funcretsym) and
+        if assigned(current_procinfo.procdef.funcretsym) and
            (tabstractvarsym(current_procinfo.procdef.funcretsym).refs <> 0) then
            (tabstractvarsym(current_procinfo.procdef.funcretsym).refs <> 0) then
           if (current_procinfo.procdef.proctypeoption=potype_constructor) then
           if (current_procinfo.procdef.proctypeoption=potype_constructor) then
             rr.ressym:=tsym(current_procinfo.procdef.parast.Find('self'))
             rr.ressym:=tsym(current_procinfo.procdef.parast.Find('self'))

+ 1 - 1
compiler/ncgutil.pas

@@ -1379,7 +1379,7 @@ implementation
         funcretloc : tlocation;
         funcretloc : tlocation;
       begin
       begin
         { Is the loading needed? }
         { Is the loading needed? }
-        if (current_procinfo.procdef.funcretloc[calleeside].loc=LOC_VOID) or
+        if is_void(current_procinfo.procdef.returndef) or
            (
            (
             (po_assembler in current_procinfo.procdef.procoptions) and
             (po_assembler in current_procinfo.procdef.procoptions) and
             (not(assigned(current_procinfo.procdef.funcretsym)) or
             (not(assigned(current_procinfo.procdef.funcretsym)) or