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

+ generate initial cfi for aarch64

git-svn-id: trunk@48701 -
florian 4 жил өмнө
parent
commit
599ba8cc2a

+ 1 - 1
compiler/aarch64/cpubase.pas

@@ -303,7 +303,7 @@ unit cpubase;
 
 
       NR_MM_RESULT_REG  = NR_D0;
       NR_MM_RESULT_REG  = NR_D0;
 
 
-      NR_RETURN_ADDRESS_REG = NR_FUNCTION_RETURN_REG;
+      NR_RETURN_ADDRESS_REG = NR_LR;
 
 
       { Offset where the parent framepointer is pushed }
       { Offset where the parent framepointer is pushed }
       PARENT_FRAMEPOINTER_OFFSET = 0;
       PARENT_FRAMEPOINTER_OFFSET = 0;

+ 7 - 2
compiler/cfidwarf.pas

@@ -244,8 +244,6 @@ implementation
           datatype:=dt_none;
           datatype:=dt_none;
       end;
       end;
 
 
-
-
 {****************************************************************************
 {****************************************************************************
                              TDwarfAsmCFILowLevel
                              TDwarfAsmCFILowLevel
 ****************************************************************************}
 ****************************************************************************}
@@ -296,6 +294,13 @@ implementation
         list.concat(tai_const.create_uleb128bit(dwarf_reg(NR_STACK_POINTER_REG)));
         list.concat(tai_const.create_uleb128bit(dwarf_reg(NR_STACK_POINTER_REG)));
         list.concat(tai_const.create_uleb128bit(0));
         list.concat(tai_const.create_uleb128bit(0));
       end;
       end;
+{$elseif defined(aarch64)}
+    procedure TDwarfAsmCFILowLevel.generate_initial_instructions(list:TAsmList);
+      begin
+        list.concat(tai_const.create_8bit(DW_CFA_def_cfa));
+        list.concat(tai_const.create_uleb128bit(dwarf_reg(NR_STACK_POINTER_REG)));
+        list.concat(tai_const.create_uleb128bit(0));
+      end;
 {$else}
 {$else}
     { if more cpu dependend stuff is implemented, this needs more refactoring }
     { if more cpu dependend stuff is implemented, this needs more refactoring }
     procedure TDwarfAsmCFILowLevel.generate_initial_instructions(list:TAsmList);
     procedure TDwarfAsmCFILowLevel.generate_initial_instructions(list:TAsmList);