From owner-freebsd-amd64@FreeBSD.ORG Mon Mar 3 18:31:16 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 BE0851065678 for ; Mon, 3 Mar 2008 18:31:16 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr3.xs4all.nl (smtp-vbr3.xs4all.nl [194.109.24.23]) by mx1.freebsd.org (Postfix) with ESMTP id 60BD88FC5B for ; Mon, 3 Mar 2008 18:31:16 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr3.xs4all.nl (8.13.8/8.13.8) with ESMTP id m23IJvS2029866; Mon, 3 Mar 2008 19:19:58 +0100 (CET) (envelope-from rsmith@xs4all.nl) Received: by slackbox.xs4all.nl (Postfix, from userid 1001) id 5D472B829; Mon, 3 Mar 2008 19:19:57 +0100 (CET) Date: Mon, 3 Mar 2008 19:19:57 +0100 From: Roland Smith To: Jean-Yves Moulin Message-ID: <20080303181957.GA62714@slackbox.xs4all.nl> Mail-Followup-To: Jean-Yves Moulin , freebsd-amd64@freebsd.org References: <47CBF364.4030905@kewego.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XsQoSWH+UP9D9v3l" Content-Disposition: inline In-Reply-To: <47CBF364.4030905@kewego.com> X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.17 (2007-11-01) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: freebsd-amd64@freebsd.org 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:31:16 -0000 --XsQoSWH+UP9D9v3l Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 03, 2008 at 01:47:32PM +0100, Jean-Yves Moulin wrote: > Hello, >=20 > I have a problem with gcc on amd64 platform. I need to do division and=20 > multiplication with float into a kernel module. This module compile, load= =20 > and run without problem on i386 platform. I can compile it on amd64 but= =20 > when I try to load it I have: >=20 > link_elf_obj: symbol __mulsf3 undefined >=20 > After some search, I found that __mulsf3 (and __divsf3...etc) are builtin= =20 > function of gcc. In my assembly source result, I have a "call __mulsf3" b= ut=20 > the function is defined nowhere. >=20 > I'm working on amd64 6.3-RELEASE binaries and source tree. >=20 >=20 > Is that normal ? Do I need to use something special in order to use float= =20 > into kernel ? How can I solve this ? Floating point arithmetic isn't used in the kernel for performance reasons.[1] The kernel is compiled with -msoft-float which prevents gcc =66rom 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.=20 Roland [1] http://www.onlamp.com/pub/a/bsd/2008/02/26/whats-new-in-freebsd-70.html= ?page=3D3=20 --=20 R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) --XsQoSWH+UP9D9v3l Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFHzEFNEnfvsMMhpyURAqj0AJ9VWDj8Aw9874SZfm/d4LvYICz7EQCfanEJ 2pCijQZsIB4DQJjEjL9qJ6o= =Bco1 -----END PGP SIGNATURE----- --XsQoSWH+UP9D9v3l--