2
0
Эх сурвалжийг харах

* improve dwarf cfi on avr

florian 2 жил өмнө
parent
commit
1fc54dd8bb

+ 5 - 2
compiler/cfidwarf.pas

@@ -257,7 +257,11 @@ implementation
         FFrameEndLabel:=nil;
         FLastLocLabel:=nil;
         code_alignment_factor:=1;
+{$if defined(avr)}
+        data_alignment_factor:=-1;
+{$else defined(avr)}
         data_alignment_factor:=-4;
+{$endif defined(avr)}
         FDwarfList:=TAsmList.Create;
       end;
 
@@ -285,8 +289,7 @@ implementation
         list.concat(tai_const.create_8bit(DW_CFA_def_cfa));
         list.concat(tai_const.create_uleb128bit(32));
         list.concat(tai_const.create_uleb128bit(2));
-        list.concat(tai_const.create_8bit(DW_CFA_offset_extended));
-        list.concat(tai_const.create_uleb128bit(36));
+        list.concat(tai_const.create_8bit(DW_CFA_offset+36));
         list.concat(tai_const.create_uleb128bit((-1) div data_alignment_factor));
       end;
 {$elseif defined(arm)}

+ 2 - 0
compiler/dwarfbase.pas

@@ -37,6 +37,8 @@ unit dwarfbase;
       DW_CFA_def_cfa          = $0c;
       DW_CFA_def_cfa_register = $0d;
       DW_CFA_def_cfa_offset   = $0e;
+      DW_CFA_advance_loc      = $40;
+      DW_CFA_offset           = $80;
       { Own additions }
       DW_CFA_start_frame = $f0;
       DW_CFA_end_frame   = $f1;