Commit Graph

35 Commits (master)

Author SHA1 Message Date
Nicolás Ojeda Bär 540996d21e Remove Spacetime 2020-10-08 20:28:12 +02:00
Xavier Leroy 9fcb295b98 Revised passing of arguments to external C functions
Introduce the type Cmm.exttype to precisely describe arguments to
external C functions, especially unboxed numerical arguments.

Annotate Cmm.Cextcall with the types of the arguments (Cmm.exttype list).
An empty list means "all arguments have default type XInt".

Annotate Mach.Iextcall with the type of the result (Cmm.machtype)
and the types of the arguments (Cmm.exttype list).

Change (slightly) the API for describing calling conventions in Proc:
- loc_external_arguments now takes a Cmm.exttype list,
  in order to know more precisely the types of the arguments.
- loc_arguments, loc_parameters, loc_results, loc_external_results
  now take a Cmm.machype instead of an array of pseudoregisters.
  (Only the types of the pseudoregisters mattered anyway.)

Update the implementations of module Proc accordingly, in every port.

Introduce a new overridable method in Selectgen, insert_move_extcall_arg,
to produce the code that moves an argument of an external C function
to the locations returned by Proc.loc_external_arguments.

Revise the selection of external calls accordingly
(method emit_extcall_args in Selectgen).
2020-07-24 17:39:22 +02:00
Greta Yorsh aeebb62e9b Move contains_calls and num_stack_slots from Proc to Mach.fundecl 2019-09-09 11:33:03 +01:00
Mark Shinwell 4334b2de87
Position [Lprologue] correctly (#2292) 2019-03-29 11:47:53 +00:00
Mark Shinwell 770e662e96
Add [Proc.destroyed_at_reloadretaddr] (#2065) 2018-10-15 12:53:27 +01:00
Mark Shinwell dacb2240a4
DWARF register numberings (#2080) 2018-10-04 11:30:52 +01:00
Mark Shinwell cd0bd8aa73 Spacetime: a new memory profiler (#585) 2016-07-29 15:07:10 +01:00
Mark Shinwell b2e7162546 Second attempt at fixing GPR#167 fallout 2016-04-15 13:41:54 +01:00
Damien Doligez 5401ce8473 Update headers for the new license.
Remains to be done: remove all headers in testsuite/tests.
2016-02-18 16:59:16 +01:00
Mark Shinwell 05f1746cb5 Rename to max_arguments_for_tailcalls; revise numbers assuming no unboxed floats using the OCaml calling conventions 2016-02-08 15:02:40 +01:00
Mark Shinwell b5618e8642 max_arguments_without_passing_on-stack 2016-01-29 15:57:36 +00:00
Jérémie Dimino e7593340c1 Split 64-bit integers on 32-bit architectures
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16385 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-25 16:18:50 +00:00
Xavier Leroy 657ba73021 Liveness & Deadcode: fix i386-specific issue with move instructions accessing
the x87 FP stack, which must not be eliminated.
CSEgen: harden against the same x87-specific issue + against reuse of
  values in fixed hardware registers that were destroyed by a prior
  operation.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14877 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-16 14:37:22 +00:00
Xavier Leroy 9c1d005ebb New back-end optimization pass: dead code elimination.
(Removes arithmetic and load instructions whose results are unused.)
(Cherry-picked from branch backend-optim.)


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14686 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-26 09:31:18 +00:00
Fabrice Le Fessant 9b53f8b10d Re-add configure option -with-frame-pointers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13738 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-03 18:03:59 +00:00
Fabrice Le Fessant 97bc1fa9e2 Reverting -with-frame-pointers
Fails to compile alt-ergo without frame-pointers. No time to debug
before tonight, so I revert and will merge again after fixing the
problem.



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13732 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-03 06:29:33 +00:00
Fabrice Le Fessant 1b2667b9f2 Add -with-frame-pointers to ./configure
This option can be used to tell the native compiler that it should
update frame pointers, so that debuggers and profiling tools 
(especially Linux perf) can use them. For now, it is only supported
by the Unix/amd64 port.



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13730 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-03 04:42:42 +00:00
Damien Doligez def31744f9 remove all $Id keywords
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13013 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-15 17:50:56 +00:00
Damien Doligez 3b507dd1aa renaming of Objective Caml to OCaml and cleanup of copyright headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11156 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-27 14:17:02 +00:00
Xavier Leroy cc0f32b054 Changement de la licence
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2553 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-11-17 18:59:06 +00:00
Xavier Leroy 119c8eeb67 Nouvelle architecture pour les fichiers dependant du processeur
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1655 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-07-24 11:49:12 +00:00
Xavier Leroy 59cc561027 asmlink: option pour produire un .o
autres: utilisation de Ccomp.create_archive.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1162 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1996-11-07 10:55:02 +00:00
Xavier Leroy 8c48de9380 emit_i386, proc_i386: autorise les moves de pile vers pile.
proc_*: ajoute 1 parametre "round" aux fonctions reload_*.
asmgen: compter le nombre de rounds de reloading, s'arreter si excessif.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@981 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1996-09-11 15:59:11 +00:00
Xavier Leroy 8d9a5e598f Utilisation de push pour passer les arguments aux fonctions C.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@817 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1996-05-16 10:39:23 +00:00
Xavier Leroy 2301d778e7 Renommage en Objective Caml
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@782 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1996-04-30 14:53:58 +00:00
Xavier Leroy 1f8a4f6da7 Reecriture du flottant I386 pour utiliser vraiment la pile de registres flottants
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@519 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-12-10 09:31:57 +00:00
Xavier Leroy ccdeba9750 emit_i386: bugs dans l'utilisation de testl et dans l'optimisation de
Iload(byte)
autres: introduction du flag Proc.rotate_registers, histoire de tasser
  les registres sur l'Intel.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@358 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-10-25 14:54:47 +00:00
Xavier Leroy 0b9972d50f Ajout du scheduler (a tester serieusement)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@202 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-08-13 09:31:50 +00:00
Xavier Leroy e4066357b1 Ajout des notices de copyright
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@195 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-08-09 15:06:35 +00:00
Xavier Leroy 9a9e2b16c8 cmmgen: MAJ sur la representation des primitives.
proc: ajout du flag word_addressed.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@142 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-07-25 11:37:38 +00:00
Xavier Leroy eb0dbcb903 Ajout de asmlibrarian, MAJ de asmlink.
clambda, closure: meilleure detection des fonctions closes.
selection: correction de storechunk.
spill: spill retarde dans les conditionnelles.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@79 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-07-11 18:03:29 +00:00
Xavier Leroy c226d5efeb Branchement du GC de la version bytecode sur le compilateur natif
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@72 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-07-10 09:48:27 +00:00
Xavier Leroy 5c09b581c8 On rend $gp callee-save et on fait ldgp seulement si necessaire
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@70 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-07-07 16:14:06 +00:00
Xavier Leroy 48514aaca8 Integration du generateur de code et du compilateur.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@51 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-07-02 16:41:48 +00:00
Xavier Leroy 3ceaa85c72 Premiere version.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@34 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-06-15 08:17:29 +00:00