Преглед изворни кода

Also avoid invalid typecast for RegLoadedWithNewValue method for mips, sparcgen and xtensa

git-svn-id: trunk@49186 -
pierre пре 4 година
родитељ
комит
75a9c5b500
3 измењених фајлова са 6 додато и 4 уклоњено
  1. 1 1
      compiler/mips/aoptcpu.pas
  2. 1 1
      compiler/sparcgen/aoptcpu.pas
  3. 4 2
      compiler/xtensa/aoptcpu.pas

+ 1 - 1
compiler/mips/aoptcpu.pas

@@ -206,11 +206,11 @@ unit aoptcpu;
     var
       p: taicpu;
     begin
-      p:=taicpu(hp);
       result:=false;
       if not ((assigned(hp)) and (hp.typ=ait_instruction)) then
         exit;
 
+      p:=taicpu(hp);
       case p.opcode of
         { These instructions do not write into a register at all }
         A_NOP,

+ 1 - 1
compiler/sparcgen/aoptcpu.pas

@@ -107,11 +107,11 @@ unit aoptcpu;
     var
       p: taicpu;
     begin
-      p:=taicpu(hp);
       result:=false;
       if not ((assigned(hp)) and (hp.typ=ait_instruction)) then
         exit;
 
+      p:=taicpu(hp);
       case p.opcode of
         { These instructions do not write into a register at all }
         A_NOP,

+ 4 - 2
compiler/xtensa/aoptcpu.pas

@@ -143,11 +143,13 @@ Implementation
     var
       p: taicpu;
     begin
-      p := taicpu(hp);
       Result := false;
-      if not(assigned(hp) and (hp.typ = ait_instruction) and (p.ops > 0)) then
+      if not(assigned(hp) and (hp.typ = ait_instruction)) then
         exit;
 
+      p := taicpu(hp);
+      if not (p.ops >0) then
+        exit; 
       case p.opcode of
         A_B,
         A_SSI,A_SSIU,A_SSX,A_SSXU,