mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-07 21:50:14 +02:00
* convert jmp into rjmp only of the target is not a function
git-svn-id: trunk@34936 -
This commit is contained in:
parent
0882c13cb7
commit
3eef641833
@ -457,7 +457,10 @@ implementation
|
||||
{ replace JMP by RJMP? ...
|
||||
... but do not mess with asm block }
|
||||
if not(inasmblock) and (taicpu(curtai).InsOffset-taicpu(curtai).oper[0]^.ref^.symbol.offset<=2048) and
|
||||
(taicpu(curtai).InsOffset-taicpu(curtai).oper[0]^.ref^.symbol.offset>=-2047) then
|
||||
(taicpu(curtai).InsOffset-taicpu(curtai).oper[0]^.ref^.symbol.offset>=-2047) and
|
||||
{ jmps to function go outside the currently considered scope, so do not mess with them.
|
||||
Those are generated by the peephole optimizer from call/ret sequences }
|
||||
not(taicpu(curtai).oper[0]^.ref^.symbol.typ=AT_FUNCTION) then
|
||||
begin
|
||||
taicpu(curtai).opcode:=A_RJMP;
|
||||
again:=true;
|
||||
|
Loading…
Reference in New Issue
Block a user