浏览代码

+ generate initial cfi for aarch64

git-svn-id: trunk@48701 -
florian 4 年之前
父节点
当前提交
599ba8cc2a
共有 2 个文件被更改,包括 8 次插入3 次删除
  1. 1 1
      compiler/aarch64/cpubase.pas
  2. 7 2
      compiler/cfidwarf.pas

+ 1 - 1
compiler/aarch64/cpubase.pas

@@ -303,7 +303,7 @@ unit cpubase;
 
       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 }
       PARENT_FRAMEPOINTER_OFFSET = 0;

+ 7 - 2
compiler/cfidwarf.pas

@@ -244,8 +244,6 @@ implementation
           datatype:=dt_none;
       end;
 
-
-
 {****************************************************************************
                              TDwarfAsmCFILowLevel
 ****************************************************************************}
@@ -296,6 +294,13 @@ implementation
         list.concat(tai_const.create_uleb128bit(dwarf_reg(NR_STACK_POINTER_REG)));
         list.concat(tai_const.create_uleb128bit(0));
       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}
     { if more cpu dependend stuff is implemented, this needs more refactoring }
     procedure TDwarfAsmCFILowLevel.generate_initial_instructions(list:TAsmList);