Query about Float Point Operation
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!
Quoted 9 lines · 914059751 at qq.com writes:
Hi , guys
I want to do float point operations in kernel like the following,int foo(double d)
{
return (int)d*d;
}May I ask any possibility of use float point operation in the kernel space?
Floating-point in the kernel is not allowed.
Signature · 2 lines
M?ns Rullg?rd mans at mansr.com
2010/3/23 ??? <[email protected]>:
Quoted 8 lines
Hi , guys
I want to do float point operations in kernel like the following,int foo(double d)
{return (int)d*d;
Quoted 7 lines
}
while compiling output error msg like following:
cannt findeabi_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.
Quoted 5 lines
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 11 lines · Rajanikanth H.V
2010/3/23 ??? <[email protected]>:
Quoted 10 lines
Hi , guys
I want to do float point operations in kernel like the following,int foo(double d)
{return (int)d*d;
}
Quoted 7 lines
Quoted 5 lines
while compiling output error msg like following:
cannt findeabi_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.
And if you do this, you end up corrupting the FP state for user applications. Then you will complain when your user applications don't work as you expect.
Thanks you guys??
Read the code in arch/arm/nwfpe/ and arch/arm/vfp, kernel DOES provide float point operation ONLY for user space in terms of two aspects.
1:
Employ hardware float point instructions, easy to implement, while increase die size of whole chip.
2:
Using software to emulate above hardware float point instructions, in short, decode every undefined instruction exceptions to inspect if that's an emulated float point instructs. While in this way kernel burden will increase as there are too many exceptions to be handled.
So basically, no float point operation in kernel space.
ROCKY
B.R
-----????-----
???: Rajanikanth H.V [mailto:rkiyerpersonal at gmail.com] ????: 2010?3?29? 13:23
???: ???
??: linux-arm-kernel
??: Re: Query about Float Point Operation
2010/3/23 ??? <[email protected]>:
Quoted 6 lines
Hi , guys
I want to do float point operations in kernel like the following,int foo(double d)
{
Quoted 8 lines
return (int)d*d;
}
while compiling output error msg like following:
cannt findeabi_dmul?balabla??????May I ask any possibility of use float point operation in the kernel
space?
Quoted 1 line
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.
Quoted 5 lines
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 11 lines · Rajanikanth H.V
2010/3/23 ??? <[email protected]>:
Quoted 10 lines
Hi , guys
I want to do float point operations in kernel like the following,int foo(double d)
{return (int)d*d;
}
Quoted 8 lines
Quoted 5 lines
while compiling output error msg like following:
cannt findeabi_dmulbalabla??????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