Skip to content

Commit

Permalink
on i386 and AMD64, mark 'morally tail' C function calls as non-leaf
Browse files Browse the repository at this point in the history
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14610 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
  • Loading branch information
gasche committed Apr 16, 2014
1 parent fa0f96a commit d74aa29
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Changes
Expand Up @@ -111,6 +111,8 @@ Bug fixes:
(Gabriel Scherer)
- bound-checking bug in caml_string_{get,set}{16,32,64}
(Pierre Chambart and Gabriel Scherer, report by Nicolas Trangez)
- sometimes wrong stack alignment at out-of-bounds array access
(Gabriel Scherer, review by Xavier Leroy, report by Pierre Chambart)

Features wishes:
- PR#4243: make the Makefiles parallelizable
Expand Down
3 changes: 3 additions & 0 deletions asmcomp/amd64/selection.ml
Expand Up @@ -234,6 +234,9 @@ method select_floatarith commutative regular_op mem_op args =
| _ ->
assert false

method! mark_c_tailcall =
Proc.contains_calls := true

(* Deal with register constraints *)

method! insert_op_debug op dbg rs rd =
Expand Down
3 changes: 3 additions & 0 deletions asmcomp/i386/selection.ml
Expand Up @@ -288,6 +288,9 @@ method select_push exp =
(Ispecific(Ipush_load_float addr), arg)
| _ -> (Ispecific(Ipush), exp)

method! mark_c_tailcall =
Proc.contains_calls := true

method! emit_extcall_args env args =
let rec size_pushes = function
| [] -> 0
Expand Down

0 comments on commit d74aa29

Please sign in to comment.