瀏覽代碼

* don't restore SP if we hadn't stored it originally

Sven/Sarah Barth 8 月之前
父節點
當前提交
ee6bfa357a
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      compiler/aarch64/cgcpu.pas

+ 1 - 0
compiler/aarch64/cgcpu.pas

@@ -2177,6 +2177,7 @@ implementation
                   begin
                     handle_reg_imm12_reg(list,A_ADD,OS_ADDR,current_procinfo.framepointer,current_procinfo.final_localsize,
                       current_procinfo.framepointer,NR_IP0,false,true);
+                    if not (pi_no_framepointer_needed in current_procinfo.flags) then
                       a_load_reg_reg(list,OS_ADDR,OS_ADDR,NR_FP,NR_SP);
                   end
                 else if pi_no_framepointer_needed in current_procinfo.flags  then