From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.8 required=5.0 tests=AWL,DNS_FROM_RFC_POST, SPF_NEUTRAL autolearn=disabled version=3.1.3 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 7687ABC37 for ; Wed, 29 Apr 2009 18:50:12 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmsBAFMi+EnRVcbvkGdsb2JhbACWMD8BAQEBCQkMBxEDpxSBCJEUAQMBA4NyBQ X-IronPort-AV: E=Sophos;i="4.38,431,1233529200"; d="scan'208";a="28492490" Received: from rv-out-0506.google.com ([209.85.198.239]) by mail1-smtp-roc.national.inria.fr with ESMTP; 29 Apr 2009 18:50:11 +0200 Received: by rv-out-0506.google.com with SMTP id l9so866166rvb.57 for ; Wed, 29 Apr 2009 09:50:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=x6FZxp5Yud3TxkDw8dig86h9Kr6dUn9z2UP/mCQUaVY=; b=NF9dEmMowqVnkwtQLqQTqQk7WLYMdNXoms8L/mPj5juVDWJHGMrrvOhp7BJEYjWKSf g/CytsrtdYwYgOWUDDt5V5zyR4MMBKYgBuCVlEhI6seCLv4xaW0O66fAmfWBN/ZHOw3b oIH32YEQdQqXsGXaysc8Sc5xXCZPVYlVGOy1M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=OME1MJTFTFRqV3vAG2oVy3RwaI9CNu0w0sI+oAtkL1bbmeIQCzJCp3E3IExlrLLozF jMTvOKdn95BiFqriqO75rA3cWInumGCqfaVwtug5VSduAt4xGnGKTI5v0QRMXFALI8rR NMQSQzfwye8aXzPnAOkBnp5Nm5bi3iyItHcvk= MIME-Version: 1.0 Received: by 10.142.171.13 with SMTP id t13mr131497wfe.229.1241023810393; Wed, 29 Apr 2009 09:50:10 -0700 (PDT) In-Reply-To: References: <90823c940904281236x61204451nac149ee15b5df73a@mail.gmail.com> Date: Wed, 29 Apr 2009 20:50:10 +0400 Message-ID: <90823c940904290950t204e354dm6921863ab44e889e@mail.gmail.com> Subject: Re: Ocamlopt code generator question From: Dmitry Bely To: Caml List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; ocamlopt:01 asmcomp:01 mlp:01 ofs:01 ofs:01 ocaml:01 unboxed:01 unboxed:01 2009:98 wrote:01 dmitry:01 dmitry:01 functions:01 functions:01 writes:01 On Wed, Apr 29, 2009 at 8:28 PM, Jeffrey Scofield wrote: > Dmitry Bely writes: > >> For amd64 we have in asmcomp/amd64/proc_nt.mlp: >> >> (* =A0xmm0 - xmm15 =A0100 - 115 =A0 =A0 =A0 xmm0 - xmm9: Caml function a= rguments >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 xmm0 - x= mm3: C function arguments >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 xmm0: Ca= ml and C function results >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 xmm6-xmm= 15 are preserved by C *) >> >> let loc_arguments arg =3D >> =A0 calling_conventions 0 9 100 109 outgoing arg >> let loc_parameters arg =3D >> =A0 let (loc, ofs) =3D calling_conventions 0 9 100 109 incoming arg in l= oc >> let loc_results res =3D >> =A0 let (loc, ofs) =3D calling_conventions 0 0 100 100 not_supported res= in loc >> >> What these first_float=3D100 and last_float=3D109 for loc_arguments and >> loc_parameters affect? My impression is that floats are always passed >> boxed, so xmm registers are in fact never used to pass parameters. > > I don't have any experience with amd64, but I have looked at the ARM code > generator of OCaml 3.10.2. =A0The first_float and last_float values there= are used > for unboxed calls to internal float functions--most notably, the C standa= rd > functions like floor(). No - for external C functions loc_external_arguments and loc_external_results are used. And of course unboxed floats can be acceptable there. But my question was about loc_arguments and loc_parameters. E.g. what is the reason to have first_float=3D100 and last_float=3D109 for loc_arguments? - Dmitry Bely