فهرست منبع

Avoid wrong typecast by adding check that p1 is an instuction before casting it to taicpu

Pierre Muller 1 سال پیش
والد
کامیت
53bf5dc6ef
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      compiler/arm/aoptcpu.pas

+ 1 - 1
compiler/arm/aoptcpu.pas

@@ -2453,7 +2453,7 @@ Implementation
         Result:=true
       else
         begin
-          if SuperRegistersEqual(Reg, NR_DEFAULTFLAGS) then
+          if SuperRegistersEqual(Reg, NR_DEFAULTFLAGS) and (p1.typ = ait_instruction) then
             begin
               { Conditional instruction reads CPSR register }
               if (taicpu(p1).condition <> C_None) then