浏览代码

* x86_64-win64: SEH finalization procedures have frame pointer set to RBP but since r25389 they save registers relative to RSP. Fixed offsets for .seh_savereg/.seh_savexmm directives.
* In epilogue, deallocate current_procinfo.framepointer, not RBP.

git-svn-id: trunk@25414 -

sergei 12 年之前
父节点
当前提交
da2887a4ec
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      compiler/x86_64/cgcpu.pas

+ 2 - 2
compiler/x86_64/cgcpu.pas

@@ -269,7 +269,7 @@ unit cgcpu;
 
         { We need to record postive offsets from RSP; if registers are saved
           at negative offsets from RBP we need to account for it. }
-        if current_procinfo.framepointer=NR_FRAME_POINTER_REG then
+        if (not use_push) then
           frame_offset:=current_procinfo.final_localsize
         else
           frame_offset:=0;
@@ -377,7 +377,7 @@ unit cgcpu;
               end
             else
               list.concat(Taicpu.op_none(A_LEAVE,S_NO));
-            list.concat(tai_regalloc.dealloc(NR_FRAME_POINTER_REG,nil));
+            list.concat(tai_regalloc.dealloc(current_procinfo.framepointer,nil));
           end;
 
         list.concat(Taicpu.Op_none(A_RET,S_NO));