Skip to main content

supporting hardware floating point unit

3 replies [Last post]
sandykhan
Offline
Joined: 2008-01-15
Points: 0

Hi,
I am building cldc for a target which has a floating point co-processor. So, my intention is to utilize that co-processor to perform floating point operations. That's why, I have set ENABLE_SOFT_FLOAT=false while building cldc. When I run that vm on target platform, some floating point operations throw exceptions and some give wrong results. After that, I tried to build by setting ENABLE_SOFT_FLOAT=false and ENABLE_ARM_VFP=true, but now some errors are appearing during build process.

These errors look like:

... _MergedSrc005.cpp
... _MergedSrc006.cpp
../../romgen/app/romgen +GenerateOopMaps
Generating oopmaps
... OopMaps.cpp
../../loopgen/app/loopgen -generate +GenerateDebugAssembly +GenerateGNUCode
Generating debug assembly code: ... Interpreter_arm.s
ASMing Interpreter_arm.s
/home/prakash/mr2build/cldc/linux_arm/target/debug/Interpreter_arm.s: Assembler messages:
/home/prakash/mr2build/cldc/linux_arm/target/debug/Interpreter_arm.s:4927: Error: selected processor does not support `fmsr s0,r0'
....................................................................
....................................................................
/home/prakash/mr2build/cldc/linux_arm/target/debug/Interpreter_arm.s:4990: Error: selected processor does not support `fldmfds r6!,{s1}'
....................................................................
/home/prakash/mr2build/cldc/linux_arm/target/debug/Interpreter_arm.s:11419: Error: selected processor does not support `fmrs r0,s0'
/home/prakash/mr2build/cldc/linux_arm/target/debug/Interpreter_arm.s:11421: Error: selected processor does not support `fmrs r0,s1'
....................................................................
/home/prakash/mr2build/cldc/linux_arm/target/debug/Interpreter_arm.s:11421: Error: selected processor does not support `fmrs r0,s31'
....................................................................
/home/prakash/mr2build/cldc/linux_arm/target/debug/Interpreter_arm.s:11565: Error: selected processor does not support `fstmfds sp!,{s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14,s15,s16,s17,s18,s19,s20,s21,s22,s23,
s24,s25,s26,s27,s28,s29,s30,s31}'
....................................................................
....................................................................
....................................................................
make[1]: *** [Interpreter_arm.o] Error 1
make[1]: Leaving directory `/home/prakash/mr2build/cldc/linux_arm/target/debug'
make: *** [_debug] Error 2

plz guide me how can i utilize that floating point co-processor by resolving this issue!

thanks.
prakash.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
olegpliss
Offline
Joined: 2006-11-09
Points: 0

> I am building cldc for a target which has a floating point co-processor.
Which FP co-processor does the target have? Dynamic compiler supports only ARM VFP co-processor. Other FP co-processors (FPA, LPC) are not supported. Please verify that you have ARM VFP co-processor. If you have other kind of co-processor, please set ENABLE_SOFT_FLOAT=true.

> So, my intention is to utilize that co-processor to perform floating point
> operations. That's why, I have set
> ENABLE_SOFT_FLOAT=false while building cldc. When I
> run that vm on target platform, some floating point
> operations throw exceptions and some give wrong
> results. After that, I tried to build by setting
> ENABLE_SOFT_FLOAT=false and ENABLE_ARM_VFP=true, but
> now some errors are appearing during build process.
>
> These errors look like:
>
>
> ... _MergedSrc005.cpp
> ... _MergedSrc006.cpp
> ../../romgen/app/romgen +GenerateOopMaps
> Generating oopmaps
> ... OopMaps.cpp
> ./../loopgen/app/loopgen -generate
> +GenerateDebugAssembly +GenerateGNUCode
> Generating debug assembly code: ...
> Interpreter_arm.s
> ASMing Interpreter_arm.s
> /home/prakash/mr2build/cldc/linux_arm/target/debug/Int
> erpreter_arm.s: Assembler messages:
> /home/prakash/mr2build/cldc/linux_arm/target/debug/Int
> erpreter_arm.s:4927: Error: selected processor does
> not support `fmsr s0,r0'
> ......................................................
> ..............
> ......................................................
> ..............
> /home/prakash/mr2build/cldc/linux_arm/target/debug/Int
> erpreter_arm.s:4990: Error: selected processor does
> not support `fldmfds r6!,{s1}'
> ......................................................
> ..............
> /home/prakash/mr2build/cldc/linux_arm/target/debug/Int
> erpreter_arm.s:11419: Error: selected processor does
> not support `fmrs r0,s0'
> /home/prakash/mr2build/cldc/linux_arm/target/debug/Int
> erpreter_arm.s:11421: Error: selected processor does
> not support `fmrs r0,s1'
> ......................................................
> ..............
> /home/prakash/mr2build/cldc/linux_arm/target/debug/Int
> erpreter_arm.s:11421: Error: selected processor does
> not support `fmrs r0,s31'
> ......................................................
> ..............
> /home/prakash/mr2build/cldc/linux_arm/target/debug/Int
> erpreter_arm.s:11565: Error: selected processor does
> not support `fstmfds
> sp!,{s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14
> ,s15,s16,s17,s18,s19,s20,s21,s22,s23,
> s24,s25,s26,s27,s28,s29,s30,s31}'
> ......................................................
> ..............
> ......................................................
> ..............
> ......................................................
> ..............
> make[1]: *** [Interpreter_arm.o] Error 1
> make[1]: Leaving directory
> `/home/prakash/mr2build/cldc/linux_arm/target/debug'
> make: *** [_debug] Error 2
>
>
> plz guide me how can i utilize that floating point
> co-processor by resolving this issue!
>
> thanks.
> prakash.

The error messages mean that assembler of your toolchain is not aware about VFP instructions. Either you don't have VFP co-processor, or it is not supported by your toolchain. In the latter case you have to update your toolchain.

Oleg

sandykhan
Offline
Joined: 2008-01-15
Points: 0

hi, sorry for the late response. actually, i was looking into the following matters to discuss

> Which FP co-processor does the target have? Dynamic
> compiler supports only ARM VFP co-processor. Other FP
> co-processors (FPA, LPC) are not supported. Please
> verify that you have ARM VFP co-processor. If you
> have other kind of co-processor, please set
> ENABLE_SOFT_FLOAT=true.

i have gathered so much information, and now i am sure that my target board has an ARM VFP co-processor. So, the build should not generate the errors which it currently generates when i set ENABLE_ARM_VFP=true, after setting ENABLE_SOFT_FLOAT=false.

> The error messages mean that assembler of your
> toolchain is not aware about VFP instructions. Either
> you don't have VFP co-processor, or it is not
> supported by your toolchain. In the latter case you
> have to update your toolchain.

As i have mentioned above that my target board has a VFP co-processor, what could be the issue with my toolchain or assembler? And what do you mean by updating the toolchain? Should i have to patch it, or should i have to re-build it by adding/updating some option?

regards.

danila
Offline
Joined: 2006-09-24
Points: 0

hi sandykhan,

what toolchain do you use?
You should refer to your toolchain documentation on whether it supports ARM VFP.

Danila