Floating Point instructions (assembly) do nothing
Hi All,
I cannot figure out why the series of instructions below is not working for me (device is a STM32F303x6).
This is just me fiddling around getting to know the CPU, I have this setting so the FP opcodes are accepted by the compiler, and it seems to be compiling what I do just fine.
.fpu fpv4-sp-d16
I have enabled the Floating Point Co-Processor as specified in the Cortex-M4 programmers manual (PM0214): Set bits 20-23 in CPACR.
But still the code below does nothing with the 's' registers.
movw r4, #4096 // Put a test value into r4
vmov s15, r4 // Copy r4 value into s15 Flt register for conversion to float
vcvt.f32.u32 s15, s15, #32 // Convert s15 'U32 value 4096' to f32 (result should be s15 = 0x45800000)
When I look at the s15 register values (in STM32CubeIDE) when debugging the code it never changes, the transfer of the value from r4 doesn't even seem to happen.
I can't see what I am doing wrong for the value to never be transferred in to the floating point register. Anyone traveled this road before? I'm hoping I just forgot to set something else up in the CPU.
Thanks.
