* more MustBeLast fixes

* const insertation algorithm fixed

git-svn-id: trunk@6337 -
This commit is contained in:
florian 2007-02-04 18:45:43 +00:00
parent fc2ddd50e3
commit 3609ddc5dd
2 changed files with 3 additions and 3 deletions

View File

@ -709,7 +709,7 @@ implementation
(taicpu(curtai.next).oper[0]^.reg=NR_PC) then
begin
penalty:=1;
hp:=tai(curtai.next);
hp:=tai(curtai.next.next);
while assigned(hp) and (hp.typ=ait_const) do
begin
inc(penalty);

View File

@ -98,8 +98,8 @@ Implementation
function MustBeLast(p : tai) : boolean;
begin
Result:=(p.typ=ait_instruction) and
((taicpu(p).opcode in [A_BL,A_BLX,A_CMP,A_CMN,A_SWI,A_TEQ,A_TST]) or
((taicpu(p).opcode=A_MOV) and (taicpu(p).oper[0]^.typ=top_reg) and (taicpu(p).oper[0]^.reg=NR_PC)) or
((taicpu(p).opcode in [A_BL,A_BLX,A_CMP,A_CMN,A_SWI,A_TEQ,A_TST,A_CMF,A_CMFE,A_MSR]) or
((taicpu(p).ops>=1) and (taicpu(p).oper[0]^.typ=top_reg) and (taicpu(p).oper[0]^.reg=NR_PC)) or
(taicpu(p).oppostfix=PF_S));
end;