diff options
author | Damien Doligez <damien.doligez@gmail.com> | 2016-02-12 11:20:02 +0100 |
---|---|---|
committer | Damien Doligez <damien.doligez@gmail.com> | 2016-02-12 11:20:02 +0100 |
commit | 59a4fd6615454362aba2b7c4c5ea788d19edd739 (patch) | |
tree | 23676178cf7f23743789096d474af2fac6eeb287 /asmcomp/amd64/emit.mlp | |
parent | 21dce60dbd6789256f1483dfad691346f1cb7cdd (diff) | |
parent | b16d0126da13755f323a2c865795915fa2455a7b (diff) | |
download | ocaml-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.mlp | 7 |
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 -> |