caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] byte-code and -fno-defer-pop
@ 2001-09-17 13:55 Markus Mottl
  2001-09-18 14:27 ` Xavier Leroy
  0 siblings, 1 reply; 2+ messages in thread
From: Markus Mottl @ 2001-09-17 13:55 UTC (permalink / raw)
  To: OCAML

Hello,

C-files in the OCaml-distribution are usually compiled with -fno-defer-pop
when they are supposed to be used with byte code, too. What is the
rationale behind? Is this only intended to limit stack growth a bit or
are there other reasons? This opposite of this option is normally turned
on when optimisation (-O) is used. Would you recommend this setting
generally for C-code that should cooperate with OCaml-byte code?

Thanks for enlightenment!

Regards,
Markus Mottl

-- 
Markus Mottl                                             markus@oefai.at
Austrian Research Institute
for Artificial Intelligence                  http://www.oefai.at/~markus
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] byte-code and -fno-defer-pop
  2001-09-17 13:55 [Caml-list] byte-code and -fno-defer-pop Markus Mottl
@ 2001-09-18 14:27 ` Xavier Leroy
  0 siblings, 0 replies; 2+ messages in thread
From: Xavier Leroy @ 2001-09-18 14:27 UTC (permalink / raw)
  To: Markus Mottl; +Cc: OCAML

> C-files in the OCaml-distribution are usually compiled with -fno-defer-pop
> when they are supposed to be used with byte code, too. What is the
> rationale behind?

There used to be a bug in gcc whereas code using computed gotos (such
as the OCaml bytecode interpreter) would be incorrectly compiled
unless the -fno-defer-pop option is given.  I don't know if this has
been fixed in recent versions of gcc.

At any rate, you're correct that -fno-defer-pop is needed only for
compiling byterun/interp.c, and applying it to all bytecode-related C
files is a bit excessive.

> Is this only intended to limit stack growth a bit or
> are there other reasons? This opposite of this option is normally turned
> on when optimisation (-O) is used. Would you recommend this setting
> generally for C-code that should cooperate with OCaml-byte code?

No, it shouldn't be necessary.

- Xavier Leroy
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-09-18 14:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-17 13:55 [Caml-list] byte-code and -fno-defer-pop Markus Mottl
2001-09-18 14:27 ` Xavier Leroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).