From owner-freebsd-amd64@FreeBSD.ORG Mon Mar 3 18:38:39 2008 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1D821065674 for ; Mon, 3 Mar 2008 18:38:39 +0000 (UTC) (envelope-from jean-yves.moulin@kewego.com) Received: from mx0.kewego.com (mx0.kewego.net [194.62.234.66]) by mx1.freebsd.org (Postfix) with ESMTP id A08958FC2D for ; Mon, 3 Mar 2008 18:38:39 +0000 (UTC) (envelope-from jean-yves.moulin@kewego.com) Received: from pifpaf.cardinet.kewego.int (unknown [10.2.2.20]) by mx0.kewego.com (Postfix) with ESMTP id 672C633C7D for ; Mon, 3 Mar 2008 19:38:38 +0100 (CET) Message-ID: <47CC45AE.5050703@kewego.com> Date: Mon, 03 Mar 2008 19:38:38 +0100 From: Jean-Yves Moulin Organization: Kewego User-Agent: Thunderbird 2.0.0.12 (X11/20080229) MIME-Version: 1.0 To: freebsd-amd64@freebsd.org References: <47CBF364.4030905@kewego.com> <20080303181957.GA62714@slackbox.xs4all.nl> In-Reply-To: <20080303181957.GA62714@slackbox.xs4all.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 03 Mar 2008 18:48:45 +0000 Subject: Re: kernel module and float X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Mar 2008 18:38:39 -0000 Roland Smith wrote: > Floating point arithmetic isn't used in the kernel for performance > reasons.[1] The kernel is compiled with -msoft-float which prevents gcc > from generating floating point instructions. In this case it uses > routines that are part of libgcc. As far as I can tell, the kernel isn't > linked with libgcc. > Of course, kernel isn't linked :) But why this code can be compiled and ran in i386 and not in amd64 ? When I compile on amd64, using , I have -mfpmath=387 and -msoft-float in my gcc flags. So, I was thinking I could use simple floating point operation. This two flags doesn't appear on i386. Thanks for your reply! I will change my code. jym