Cortex M7 and vfma instruction

Asked by Laurence

Hiya,

Are the vmfa and vmla series instructions supported by arm-none-eabi-gcc on Cortex M7 and even M4?

Thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Solved by:
Laurence
Solved:
Last query:
Last reply:
Revision history for this message
Andre Vieira (andre-simoesdiasvieira) said :
#1

Hi Laurence,

With the appropriate -mfpu variant (fpv4-sp-d16/fpv5-sp-d16/fpv5-d16) and -mfpu=(softfp/hard) then it should generate those instructions when it sees fit.

Cortex-M4 and Cortex-M7 with either of the above mentioned FPU's support it anyway.

$ cat t.c
extern double g;

void foo (double a, double b)
{
  g += a * b;
}

$ arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -O1 -S
$ cat t.s
...
foo:
        @ args = 0, pretend = 0, frame = 0
        @ frame_needed = 0, uses_anonymous_args = 0
        @ link register save eliminated.
        ldr r3, .L2
        vldr.64 d7, [r3]
        vmla.f64 d7, d0, d1
        vstr.64 d7, [r3]
        bx lr
...

Cheers,
Andre

Revision history for this message
Laurence (lau-l99) said :
#2

Fantastic - thanks very much!