Query about Float Point Operation

Martin Guy martinwguy at gmail.com
Mon Mar 29 06:59:45 EDT 2010


On 3/29/10, Rajanikanth H.V <rkiyerpersonal at gmail.com> wrote:
> 2010/3/23 胡杨树 <914059751 at qq.com>:
>  > Hi , guys
>  > I want to do float point operations in kernel like the following,
>  >
>  > int foo(double d)
>  > {
>  >
>  > return (int)d*d;
>  >
>  > }
>  >
>  > while compiling output error msg like following:
>  > cannt find eabi_dmul  balabla。。。。。。
>  >
>  > May I ask any possibility of use float point operation in the kernel space?
>  > Any hints/doc would be appreciated!
>  I do not know how are you compiling the required function.
>  Use hardware floating point support. If your target SOC support.
>  Also verify whether Floating Point Emulation -> VFP is enabled in your config.

Wrong. You cannot do floating point operations inside the linux kernel.
At best, you can use fixed-point arithmetic.

    M



More information about the linux-arm-kernel mailing list