Explorar o código

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 %!s(int64=7) %!d(string=hai) anos
pai
achega
ba000bec89
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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;