mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 13:39:26 +02:00
* arm thumb: do not cause bxx getting too long ranges when inserting constant blocks
git-svn-id: trunk@24437 -
This commit is contained in:
parent
a0d3750b81
commit
ccdd4437d6
@ -1068,16 +1068,29 @@ implementation
|
|||||||
(taicpu(curtai).oper[1]^.typ=top_reg) and
|
(taicpu(curtai).oper[1]^.typ=top_reg) and
|
||||||
(taicpu(curtai).oper[1]^.reg=NR_PC)
|
(taicpu(curtai).oper[1]^.reg=NR_PC)
|
||||||
)
|
)
|
||||||
|
) and
|
||||||
|
(
|
||||||
|
{ do not insert data after a B instruction due to their limited range }
|
||||||
|
not((current_settings.cputype in cpu_thumb) and
|
||||||
|
(taicpu(curtai).opcode=A_B)
|
||||||
|
)
|
||||||
) then
|
) then
|
||||||
begin
|
begin
|
||||||
lastinspos:=-1;
|
lastinspos:=-1;
|
||||||
extradataoffset:=0;
|
extradataoffset:=0;
|
||||||
|
|
||||||
if current_settings.cputype in cpu_thumb then
|
if current_settings.cputype in cpu_thumb then
|
||||||
limit:=508
|
limit:=502
|
||||||
else
|
else
|
||||||
limit:=1016;
|
limit:=1016;
|
||||||
|
|
||||||
|
{ on arm thumb, insert the date always after all labels etc. following an instruction so it
|
||||||
|
is prevent that a bxx yyy; bl xxx; yyyy: sequence gets separated ( we never insert on arm thumb after
|
||||||
|
bxx) and the distance of bxx gets too long }
|
||||||
|
if current_settings.cputype in cpu_thumb then
|
||||||
|
while assigned(tai(curtai.Next)) and (tai(curtai.Next).typ in SkipInstr+[ait_label]) do
|
||||||
|
curtai:=tai(curtai.next);
|
||||||
|
|
||||||
doinsert:=false;
|
doinsert:=false;
|
||||||
hp:=tai(curtai.next);
|
hp:=tai(curtai.next);
|
||||||
current_asmdata.getjumplabel(l);
|
current_asmdata.getjumplabel(l);
|
||||||
|
Loading…
Reference in New Issue
Block a user