From 7878a7b390e07d0ea5000510a9634181afbed6cb Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 2 Mar 2025 14:58:48 +0100 Subject: [PATCH] * better error reporting * indentation --- compiler/avr/aasmcpu.pas | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/compiler/avr/aasmcpu.pas b/compiler/avr/aasmcpu.pas index 42f51a2848..c7f3900cdc 100644 --- a/compiler/avr/aasmcpu.pas +++ b/compiler/avr/aasmcpu.pas @@ -482,7 +482,7 @@ implementation (taicpu(curtai).InsOffset-taicpu(curtai).oper[0]^.ref^.symbol.offset<-64*2)) then begin if inasmblock then - Message(asmw_e_brxx_out_of_range) + MessagePos(taicpu(curtai).fileinfo,asmw_e_brxx_out_of_range) else begin current_asmdata.getjumplabel(l); @@ -504,14 +504,14 @@ implementation in the reverse direction by 2 bytes, hence checking against a distance of -2049*2 bytes. } if not(inasmblock) and (taicpu(curtai).InsOffset-taicpu(curtai).oper[0]^.ref^.symbol.offset<=2047*2) and - (taicpu(curtai).InsOffset-taicpu(curtai).oper[0]^.ref^.symbol.offset>=-2049*2) 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; - end; + (taicpu(curtai).InsOffset-taicpu(curtai).oper[0]^.ref^.symbol.offset>=-2049*2) 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; + end; A_STS: begin if current_settings.cputype in [cpu_avrtiny, cpu_avr1] then