瀏覽代碼

* 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 年之前
父節點
當前提交
f90768ed6a
共有 1 個文件被更改,包括 4 次插入3 次删除
  1. 4 3
      compiler/x86/rax86int.pas

+ 4 - 3
compiler/x86/rax86int.pas

@@ -230,11 +230,12 @@ Unit Rax86int;
       begin
         is_register:=false;
         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
-            entry := current_procinfo.procdef.parast.Find(s);
+            entry:=current_procinfo.procdef.parast.Find(s);
             if assigned(entry) and
-               (po_assembler in current_procinfo.procdef.procoptions) and
                (entry.typ=paravarsym) and
                assigned(tparavarsym(entry).paraloc[calleeside].Location) and
                (tparavarsym(entry).paraloc[calleeside].Location^.Loc=LOC_REGISTER) then