summaryrefslogtreecommitdiff
path: root/asmcomp/amd64/emit.mlp
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez@gmail.com>2016-02-12 11:20:02 +0100
committerDamien Doligez <damien.doligez@gmail.com>2016-02-12 11:20:02 +0100
commit59a4fd6615454362aba2b7c4c5ea788d19edd739 (patch)
tree23676178cf7f23743789096d474af2fac6eeb287 /asmcomp/amd64/emit.mlp
parent21dce60dbd6789256f1483dfad691346f1cb7cdd (diff)
parentb16d0126da13755f323a2c865795915fa2455a7b (diff)
downloadocaml-59a4fd6615454362aba2b7c4c5ea788d19edd739.tar.gz
Merge pull request #408 from btj/trunk
Fixes bugs in stack unwinding metadata (PR#7118,7120)
Diffstat (limited to 'asmcomp/amd64/emit.mlp')
-rw-r--r--asmcomp/amd64/emit.mlp7
1 files changed, 7 insertions, 0 deletions
diff --git a/asmcomp/amd64/emit.mlp b/asmcomp/amd64/emit.mlp
index 1c392e2524..cf6daeb813 100644
--- a/asmcomp/amd64/emit.mlp
+++ b/asmcomp/amd64/emit.mlp
@@ -840,6 +840,13 @@ let fundecl fundecl =
emit_all true fundecl.fun_body;
List.iter emit_call_gc !call_gc_sites;
emit_call_bound_errors ();
+ if frame_required() then begin
+ let n = frame_size() - 8 - (if fp then 8 else 0) in
+ if n <> 0
+ then begin
+ cfi_adjust_cfa_offset (-n);
+ end;
+ end;
cfi_endproc ();
begin match system with
| S_gnu | S_linux ->