gcc doesn't seem to allow VABS instruction
Edit: I found the problem (duh). The instruction must be written as VABS.F32
I'm trying to create the following intrinsic function to take advantage of the floating-point absolute value instruction in the Cortex-M4F processor:
static inline float _fabs(float x)
{
asm
(
"VABS %[s0],%[s0] "
: [s0] "+w" (x)
) ;
return x ;
}
However, I'm getting the following error message from the assembler when I compile my C source code:
Error: selected FPU does not support instruction -- 'vabs s15,s15'
My gcc command line and options are as follows:
arm-
I know the instruction is available in the Cortex-M4, and I believe I have the correct -mfpu option specified.
I'm using Version 7-2018-q2-update of the GNU ARM Embedded Toolchain.
Does anyone see something I'm doing wrong?
Thanks!
Dan
Question information
- Language:
- English Edit question
- Status:
- Expired
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: