소스 검색

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