From: "Markus Rechberger" <mrechberger@gmail.com>
To: Ram <vshrirama@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Floating point computations in kernel modules
Date: Mon, 17 Sep 2007 16:17:59 +0200 [thread overview]
Message-ID: <d9def9db0709170717t1aeb9bf5t38182bb6bbef816c@mail.gmail.com> (raw)
In-Reply-To: <8bf247760709170706j6025bb14k8ab28f9467972c76@mail.gmail.com>
Hi,
On 9/17/07, Ram <vshrirama@gmail.com> wrote:
> Hi,
>
> I am trying to write a driver which uses double, float. I am using
> an arm11 with gcc 3.4.4
>
> When i try to compile my modules (with float variables) i get the error
>
> WARNING: "__extendsfdf2" undefined!
> WARNING: "__mulsf3"undefined!
> WARNING: "__fixsfsi"undefined!
> WARNING: "__floatsisf"undefined!
>
> Can we use float, double in kernel modules?.
>
in general you shouldn't use floating point in the kernel since there's no
portable way which will work among different architectures.
> Obviously it is a linking error, I am using soft-float. I tried with
> -msoft-float but got the same result.
>
> I suspect that its a toolchain issue. However i am able to compile
> my applications
> with float, double variables.
>
>
> Please do advice.
>
if you need a solution inkernel best would be to try to get around by converting
your algorithm to integer.
although you might have a look at:
http://www.fi.muni.cz/~xslaby/unpr.html
http://www.mail-archive.com/linuxppc-embedded%40ozlabs.org/msg01291.html
Markus
prev parent reply other threads:[~2007-09-17 14:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-17 14:06 Ram
2007-09-17 14:13 ` Trond Myklebust
2007-09-17 14:17 ` Markus Rechberger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d9def9db0709170717t1aeb9bf5t38182bb6bbef816c@mail.gmail.com \
--to=mrechberger@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vshrirama@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®