mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 11:09:19 +02:00
* ARM: fixed detecting Thumb-style jump tables in insertpcrelativedata() after r28546.
git-svn-id: trunk@28702 -
This commit is contained in:
parent
27befd2375
commit
b08ffa0a87
@ -1055,15 +1055,16 @@ implementation
|
|||||||
(tai(hp).typ=ait_instruction) then
|
(tai(hp).typ=ait_instruction) then
|
||||||
begin
|
begin
|
||||||
case taicpu(hp).opcode of
|
case taicpu(hp).opcode of
|
||||||
A_BX,
|
A_MOV,
|
||||||
A_LDR,
|
A_LDR,
|
||||||
A_ADD:
|
A_ADD:
|
||||||
{ approximation if we hit a case jump table }
|
{ approximation if we hit a case jump table }
|
||||||
if ((taicpu(hp).opcode in [A_ADD,A_LDR]) and not(GenerateThumbCode or GenerateThumb2Code) and
|
if ((taicpu(hp).opcode in [A_ADD,A_LDR]) and not(GenerateThumbCode or GenerateThumb2Code) and
|
||||||
(taicpu(hp).oper[0]^.typ=top_reg) and
|
(taicpu(hp).oper[0]^.typ=top_reg) and
|
||||||
(taicpu(hp).oper[0]^.reg=NR_PC)) or
|
(taicpu(hp).oper[0]^.reg=NR_PC)) or
|
||||||
((taicpu(hp).opcode=A_BX) and (GenerateThumbCode) and
|
((taicpu(hp).opcode=A_MOV) and (GenerateThumbCode) and
|
||||||
(taicpu(hp).oper[0]^.typ=top_reg))
|
(taicpu(hp).oper[0]^.typ=top_reg) and
|
||||||
|
(taicpu(hp).oper[0]^.reg=NR_PC))
|
||||||
then
|
then
|
||||||
begin
|
begin
|
||||||
penalty:=multiplier;
|
penalty:=multiplier;
|
||||||
|
Loading…
Reference in New Issue
Block a user