Quellcode durchsuchen

* synchronize reg. variables before loading the function result

git-svn-id: trunk@2163 -
florian vor 20 Jahren
Ursprung
Commit
a71d2b432c
1 geänderte Dateien mit 6 neuen und 6 gelöschten Zeilen
  1. 6 6
      compiler/psub.pas

+ 6 - 6
compiler/psub.pas

@@ -825,12 +825,6 @@ implementation
             free_regvars(aktproccode);
 {$endif OLDREGVARS}
 
-            { add code that will load the return value, this is not done
-              for assembler routines when they didn't reference the result
-              variable }
-            gen_load_return_value(templist);
-            aktproccode.concatlist(templist);
-
             { generate symbol and save end of header position }
             aktfilepos:=entrypos;
             gen_proc_symbol(templist);
@@ -844,6 +838,12 @@ implementation
             gen_free_symtable(aktproccode,procdef.localst);
             gen_free_symtable(aktproccode,procdef.parast);
 
+            { add code that will load the return value, this is not done
+              for assembler routines when they didn't reference the result
+              variable }
+            gen_load_return_value(templist);
+            aktproccode.concatlist(templist);
+
             { Already reserve all registers for stack checking code and
               generate the call to the helper function }
             if (cs_check_stack in entryswitches) and