diff --git a/compiler/i386/aoptcpu.pas b/compiler/i386/aoptcpu.pas index a4dea8ed6d..f8c577bb55 100644 --- a/compiler/i386/aoptcpu.pas +++ b/compiler/i386/aoptcpu.pas @@ -244,6 +244,21 @@ unit aoptcpu; else ; end; + { If this flag is set, force another run of pass 1 even if p wasn't + changed } + if aoc_ForceNewIteration in OptsToCheck then + begin + Exclude(OptsToCheck, aoc_ForceNewIteration); + + if not Result then + begin + if not (p.typ in SkipInstr) then + UpdateUsedRegs(p); + + p := tai(p.Next); + Result := True; + end; + end; end; @@ -283,21 +298,6 @@ unit aoptcpu; else ; end; - { If this flag is set, force another run of pass 1 even if p wasn't - changed } - if aoc_ForceNewIteration in OptsToCheck then - begin - Exclude(OptsToCheck, aoc_ForceNewIteration); - - if not Result then - begin - if not (p.typ in SkipInstr) then - UpdateUsedRegs(p); - - p := tai(p.Next); - Result := True; - end; - end; end; diff --git a/compiler/x86_64/aoptcpu.pas b/compiler/x86_64/aoptcpu.pas index 5c637ccb87..c01d311935 100644 --- a/compiler/x86_64/aoptcpu.pas +++ b/compiler/x86_64/aoptcpu.pas @@ -166,7 +166,21 @@ uses else ; end; + { If this flag is set, force another run of pass 1 even if p wasn't + changed } + if aoc_ForceNewIteration in OptsToCheck then + begin + Exclude(OptsToCheck, aoc_ForceNewIteration); + if not Result then + begin + if not (p.typ in SkipInstr) then + UpdateUsedRegs(p); + + p := tai(p.Next); + Result := True; + end; + end; end; @@ -202,21 +216,6 @@ uses else ; end; - { If this flag is set, force another run of pass 1 even if p wasn't - changed } - if aoc_ForceNewIteration in OptsToCheck then - begin - Exclude(OptsToCheck, aoc_ForceNewIteration); - - if not Result then - begin - if not (p.typ in SkipInstr) then - UpdateUsedRegs(p); - - p := tai(p.Next); - Result := True; - end; - end; end;