Просмотр исходного кода

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 лет назад
Родитель
Сommit
ba000bec89
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      compiler/powerpc64/cpubase.pas

+ 2 - 0
compiler/powerpc64/cpubase.pas

@@ -495,6 +495,8 @@ begin
     internalerror(200112301);
   result.simple := true;
   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];
 end;