|
@@ -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;
|