* do not split statements following A_IT* instructions on arm thumb2 when inserting constant pools

git-svn-id: trunk@25347 -
This commit is contained in:
florian 2013-08-23 15:22:51 +00:00
parent 8884f1c0bf
commit b4c7b40049

View File

@ -1033,12 +1033,14 @@ implementation
end; end;
{ special case for case jump tables } { special case for case jump tables }
if SimpleGetNextInstruction(curtai,hp) and if SimpleGetNextInstruction(curtai,hp) and
(tai(hp).typ=ait_instruction) and (tai(hp).typ=ait_instruction) then
(taicpu(hp).opcode=A_LDR) and begin
(taicpu(hp).oper[0]^.typ=top_reg) and case taicpu(hp).opcode of
A_LDR:
if (taicpu(hp).oper[0]^.typ=top_reg) and
(taicpu(hp).oper[0]^.reg=NR_PC) then (taicpu(hp).oper[0]^.reg=NR_PC) then
begin begin
penalty:=1*multiplier; penalty:=multiplier;
hp:=tai(hp.next); hp:=tai(hp.next);
{ skip register allocations and comments inserted by the optimizer } { skip register allocations and comments inserted by the optimizer }
while assigned(hp) and (hp.typ in [ait_comment,ait_regalloc]) do while assigned(hp) and (hp.typ in [ait_comment,ait_regalloc]) do
@ -1048,6 +1050,33 @@ implementation
inc(penalty,multiplier); inc(penalty,multiplier);
hp:=tai(hp.next); hp:=tai(hp.next);
end; end;
end;
A_IT:
if current_settings.cputype in cpu_thumb2 then
penalty:=multiplier;
A_ITE,
A_ITT:
if current_settings.cputype in cpu_thumb2 then
penalty:=2*multiplier;
A_ITEE,
A_ITTE,
A_ITET,
A_ITTT:
if current_settings.cputype in cpu_thumb2 then
penalty:=3*multiplier;
A_ITEEE,
A_ITTEE,
A_ITETE,
A_ITTTE,
A_ITEET,
A_ITTET,
A_ITETT,
A_ITTTT:
if current_settings.cputype in cpu_thumb2 then
penalty:=4*multiplier;
else
penalty:=0;
end;
end end
else else
penalty:=0; penalty:=0;