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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id 962257ED5C for ; Wed, 8 Aug 2012 20:40:29 +0200 (CEST) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of dmitry.bely@gmail.com) identity=pra; client-ip=209.85.216.47; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="dmitry.bely@gmail.com"; x-sender="dmitry.bely@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of dmitry.bely@gmail.com designates 209.85.216.47 as permitted sender) identity=mailfrom; client-ip=209.85.216.47; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="dmitry.bely@gmail.com"; x-sender="dmitry.bely@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-qa0-f47.google.com) identity=helo; client-ip=209.85.216.47; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="dmitry.bely@gmail.com"; x-sender="postmaster@mail-qa0-f47.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: An8FAPuxIlDRVdgvk2dsb2JhbABFuF4CdggiAQEBAQkJCx0EI4IgAQEBAwESAiwBGx4DAQsGBQsNLiEBAREBBQEcGSKHWwEDBgacRQkDjCOCcYVIChknDVeIcQEFDIohZYFvgVWDHAOISIsugVOLCoMoPoQD X-IronPort-AV: E=Sophos;i="4.77,734,1336341600"; d="scan'208";a="152709737" Received: from mail-qa0-f47.google.com ([209.85.216.47]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 08 Aug 2012 20:40:28 +0200 Received: by qaat11 with SMTP id t11so3287843qaa.6 for ; Wed, 08 Aug 2012 11:40:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=8n4C9q+/nSmTPTRCVFa39ogw1bSN56lmjGsLqnGhh4A=; b=iyMGmZz9ED5k+yuEottrcUwCteQiSJkt50l3jOTqZGsWEfXuu7EAvpINT2yVxMdvhj 0cehv5v1s0wJyR0klFz7pimun+FQnPPvGnDdhsj+q6H+4w883PrMbqbn+GwhnGhtAL22 PWoY6fW5jUKy54TJ64O8hllTm5vXgv7Hhvjz6WKY4oPbTI9KD9N21zTIK9+RCtXRmIVO NsXgIDqg6jcXsKb9lwX4N2Hqw9IX+3za/dcXAB5xHVE9ae8hEtKPIr5QonnhI8nbr0g5 CWVYXLe++xGM4wtTNeuwjCmuZGC0UjXVxE7Bv15uhYdfcsbHvcapKdFwG5bmE7gJS7Nz DCxA== MIME-Version: 1.0 Received: by 10.224.174.72 with SMTP id s8mr31625721qaz.91.1344451227683; Wed, 08 Aug 2012 11:40:27 -0700 (PDT) Received: by 10.49.48.101 with HTTP; Wed, 8 Aug 2012 11:40:27 -0700 (PDT) In-Reply-To: References: <501F9855.6080709@frisch.fr> <501F9DB9.2050805@frisch.fr> <501FAB4A.107@frisch.fr> <5022A9FE.4050006@frisch.fr> Date: Wed, 8 Aug 2012 22:40:27 +0400 Message-ID: From: Dmitry Bely To: caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Caml-list] Compiler bug? On Wed, Aug 8, 2012 at 10:22 PM, Jesper Louis Andersen wrote: > On Wed, Aug 8, 2012 at 8:03 PM, Alain Frisch wrote: > >> I'm not sure, someone else would have to reply! I guess that these >> registers are supposed to be preserved by the callee in the x64 ABI (and >> obviously, they don't hold pointers to OCaml values, so they don't have to >> be tracked by the GC). Yes, they should not be tracked by GC, but they may hold some FP values (can they across GC call?). Actually for x64 FPU registers are saved; see amd64.S/amd64nt.asm. But not for x86. I'm curious why. > Also, the GC itself will not be using Floating Point code at all, so > we can save a lot by not saving/restoring these values on the stack. This is not entirely true; GC also triggers pending signals processing that can modify FPU state and calls C library fuctions (e.g. malloc) that can do anything inside. > It is akin to what the Linux kernel does: trap on the first FP > instruction and only then do work to save/restore the FP context - but > here we know a priori we never will access FP. By doing so we can cut > the time to the GC call down - and reap the benefits by having a > faster GC cycle. - Dmitry Bely