Browse Source

* better error reporting
* indentation

florian 5 months ago
parent
commit
7878a7b390
1 changed files with 9 additions and 9 deletions
  1. 9 9
      compiler/avr/aasmcpu.pas

+ 9 - 9
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