소스 검색

Generate error if CR field of F var is zero, as it leads to invalid instruction for conditional branching

git-svn-id: trunk@38495 -
pierre 7 년 전
부모
커밋
ba000bec89
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      compiler/powerpc64/cpubase.pas

+ 2 - 0
compiler/powerpc64/cpubase.pas

@@ -495,6 +495,8 @@ begin
     internalerror(200112301);
     internalerror(200112301);
   result.simple := true;
   result.simple := true;
   result.cr := f.cr;
   result.cr := f.cr;
+  if byte(f.cr)=0 then
+    Comment(V_error,'Wrong use of whole CR register in falgs_to_cond');
   result.cond := flag_2_cond[f.flag];
   result.cond := flag_2_cond[f.flag];
 end;
 end;