소스 검색

+ take into account the fact that lea doesn't read the segment register of its
reference in i386's TCpuAsmOptimizer.RegReadByInstruction

git-svn-id: trunk@36080 -

nickysn 8 년 전
부모
커밋
0cd70844f1
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      compiler/i386/aoptcpu.pas

+ 5 - 0
compiler/i386/aoptcpu.pas

@@ -190,6 +190,11 @@ unit aoptcpu;
           end;
         else
           begin
+            if (p.opcode=A_LEA) and is_segment_reg(reg) then
+              begin
+                RegReadByInstruction := false;
+                exit;
+              end;
             for opcount := 0 to p.ops-1 do
               if (p.oper[opCount]^.typ = top_ref) and
                  RegInRef(reg,p.oper[opcount]^.ref^) then