Date: Mon, 3 Mar 2008 19:19:57 +0100 From: Roland Smith <rsmith@xs4all.nl> To: Jean-Yves Moulin <jean-yves.moulin@kewego.com> Cc: freebsd-amd64@freebsd.org Subject: Re: kernel module and float Message-ID: <20080303181957.GA62714@slackbox.xs4all.nl> In-Reply-To: <47CBF364.4030905@kewego.com> References: <47CBF364.4030905@kewego.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080303181957.GA62714>