Browse Source

* small optimisation for r14449: check whether the routine is a pure
assembler routine before checking whether an identifier may represent a
register parameter, instead of afterwards

git-svn-id: trunk@14843 -

Jonas Maebe 15 years ago
parent
commit
f90768ed6a
1 changed files with 4 additions and 3 deletions
  1. 4 3
      compiler/x86/rax86int.pas

+ 4 - 3
compiler/x86/rax86int.pas

@@ -230,11 +230,12 @@ Unit Rax86int;
       begin
       begin
         is_register:=false;
         is_register:=false;
         actasmregister:=masm_regnum_search(lower(s));
         actasmregister:=masm_regnum_search(lower(s));
-        if (actasmregister=NR_NO) and (current_procinfo.procdef.proccalloption=pocall_register) then
+        if (actasmregister=NR_NO) and
+           (current_procinfo.procdef.proccalloption=pocall_register) and
+           (po_assembler in current_procinfo.procdef.procoptions) then
           begin
           begin
-            entry := current_procinfo.procdef.parast.Find(s);
+            entry:=current_procinfo.procdef.parast.Find(s);
             if assigned(entry) and
             if assigned(entry) and
-               (po_assembler in current_procinfo.procdef.procoptions) and
                (entry.typ=paravarsym) and
                (entry.typ=paravarsym) and
                assigned(tparavarsym(entry).paraloc[calleeside].Location) and
                assigned(tparavarsym(entry).paraloc[calleeside].Location) and
                (tparavarsym(entry).paraloc[calleeside].Location^.Loc=LOC_REGISTER) then
                (tparavarsym(entry).paraloc[calleeside].Location^.Loc=LOC_REGISTER) then