I'm trying to retrieve the binary representation of a few FPU instructions for the Cortex-M4 processor. I resolved to put the code I need to retrieve in a file like this
.syntax unified
vsub.f32 s0, s1, s2 ; or any other instruction
and then call
arm-none-eabi-as -o /dev/null -mcpu=cortex-m4 -march=armv7e-m -mfloat-abi=hard -al -EB <file>
However, for FPU instructions, it fails telling me
Assembler messages:
Error: invalid instruction shape -- `vsub.f32 s0,s1,s2'
What am I doing wrong? Thanks
Apparently, the
-mfpuflag is needed too (in this case,-mfpu=fpv4-sp-d16):