소스 검색

+ allow call ref on x86 for references that don't contain any registers, as the register allocator doesn't fail on them, if all registers are allocated

git-svn-id: trunk@32286 -
nickysn 9 년 전
부모
커밋
9de7830c8c
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      compiler/x86/nx86cal.pas

+ 2 - 1
compiler/x86/nx86cal.pas

@@ -90,7 +90,8 @@ implementation
       tcgx86(cg).make_simple_ref(current_asmdata.CurrAsmList,ref);
       { do not use a ref. for calling conventions which allocate all registers, the reg. allocator cannot handle this, see
         also issue #28639, I were not able to create a simple example though to cause the resulting endless spilling }
-      result:=not(procdefinition.proccalloption in [pocall_far16,pocall_pascal,pocall_oldfpccall]);
+      result:=((ref.base=NR_NO) and (ref.index=NR_NO)) or
+              not(procdefinition.proccalloption in [pocall_far16,pocall_pascal,pocall_oldfpccall]);
     end;