From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id E1DF67ED5C for ; Mon, 6 Aug 2012 12:59:31 +0200 (CEST) Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of alain@frisch.fr) identity=pra; client-ip=193.252.23.211; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="alain@frisch.fr"; x-sender="alain@frisch.fr"; x-conformance=sidf_compatible Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of alain@frisch.fr) identity=mailfrom; client-ip=193.252.23.211; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="alain@frisch.fr"; x-sender="alain@frisch.fr"; x-conformance=sidf_compatible Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@msa.smtpout.orange.fr) identity=helo; client-ip=193.252.23.211; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="alain@frisch.fr"; x-sender="postmaster@msa.smtpout.orange.fr"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoYCAPp4H1DB/BfTlGdsb2JhbABFtg2DUwEBAQEJCwkJFAMkgiABAQU4QAEQCxgJFg8JAwIBAgFFBg0BBwEBiA27DotKhwQDlUmFW40S X-IronPort-AV: E=Sophos;i="4.77,717,1336341600"; d="scan'208";a="169180832" Received: from msa02.smtpout.orange.fr (HELO msa.smtpout.orange.fr) ([193.252.23.211]) by mail1-smtp-roc.national.inria.fr with ESMTP; 06 Aug 2012 12:59:31 +0200 Received: from [192.168.1.105] ([86.195.1.229]) by mwinf5d27 with ME id jNaa1j0024wTVSm03Naa9M; Mon, 06 Aug 2012 12:34:34 +0200 Message-ID: <501F9DB9.2050805@frisch.fr> Date: Mon, 06 Aug 2012 12:34:33 +0200 From: Alain Frisch User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Dmitry Bely CC: caml-list@inria.fr References: <501F9855.6080709@frisch.fr> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] Compiler bug? On 08/06/2012 12:20 PM, Dmitry Bely wrote: > I always thought that local roots are memory-based. How GC knows that > in this case [ebx] should be updated? (remember, the parameter was > passed in [eax]) Could you point me to the relevant part of Ocaml > compiler sources? The compiler generates 'frame descriptors', which associate to each possible GC call site the set of registers and stack slots which hold values. Look for caml_frame_descriptors. The logic to scan frame descriptors is in asmrun/roots.c. The implementation of caml_call_gc (e.g. in amd64.S) saves/restored machine registers to/from caml_gc_regs. Alain