浏览代码

+ m68k: initial implementation of g_stackpointer_alloc method, it has to exist for targets with non-fixed stack.

git-svn-id: trunk@28064 -
sergei 11 年之前
父节点
当前提交
ad59098457
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      compiler/m68k/cgcpu.pas

+ 7 - 0
compiler/m68k/cgcpu.pas

@@ -98,6 +98,7 @@ unit cgcpu;
         procedure sign_extend(list: TAsmList;_oldsize : tcgsize; reg: tregister);
         procedure sign_extend(list: TAsmList;_oldsize : tcgsize; _newsize : tcgsize; reg: tregister);
 
+        procedure g_stackpointer_alloc(list : TAsmList;localsize : longint);override;
      protected
         function fixref(list: TAsmList; var ref: treference): boolean;
 
@@ -2114,6 +2115,12 @@ unit cgcpu;
       end;
 
 
+    procedure tcg68k.g_stackpointer_alloc(list : TAsmList;localsize : longint);
+      begin
+        list.concat(taicpu.op_const_reg(A_SUB,S_L,localsize,NR_STACK_POINTER_REG));
+      end;
+
+
 {****************************************************************************}
 {                               TCG64F68K                                    }
 {****************************************************************************}