3

What's the difference between ARM VFP instructions starting with V and with F?

Why doesn't the ARM Information Center list the F instructions in the assembly reference anymore?

Most of them directly map to each other (for example, vcvtr.s32.f32 and ftosis), so why do they both exist?

For example, these functions do the same (flooring float->int conversion):

vmrs %r1, fpscr
bic %r0, %r1, #0xc00000
orr %r0, %r0, #0x800000
vmsr fpscr, %r0
vcvtr.s32.f32 %s2, %s2
vmov %r0, %s2
vmsr fpscr, %r1

mrs %r1, fpscr
bic %r0, %r1, #0xc00000
orr %r0, %r0, #0x800000
msr fpscr, %r0
ftosis %s2, %s2
fmrs %r0, %s2
msr fpscr, %r1
Triang3l
  • 1,230
  • 9
  • 29
  • An older version perhaps (i.e. VFPv1)? As ARM say: _"VFPv1 is obsolete. Details are available on request from ARM."_, which would explain why you don't find information about the instructions on their website. – Michael Aug 30 '13 at 14:51
  • Actually, there is information about those functions, but it's marked as legacy and superseded. However, many articles about new things are marked so as well. – Triang3l Aug 30 '13 at 14:52
  • 1
    I dont think this is an FPA vs VFP. As answered below, this is two variations of the syntax of the assembly language for the same instruction set (vfp). – old_timer Aug 30 '13 at 17:33

1 Answers1

6

The Fxxx names are the “Pre-UAL” (Unified Assembly Language) names, and they are deprecated. The Vxxx names are the UAL names, and are what you should be using for new code.

Stephen Canon
  • 103,815
  • 19
  • 183
  • 269
  • Are the new instructions supported by the pre-UAL processors? – Triang3l Aug 30 '13 at 14:56
  • 3
    The instruction *name* is distinct from the *instruction*; the cases where there’s a Vxxx name that does the same thing as the Fxxx name, they are two names for the same instruction (and encoding), so of course they work on older processors. – Stephen Canon Aug 30 '13 at 14:58
  • 3
    (Of course, there are also a much of Vxxx instructions that are actually new instructions and don’t have Fxxx analogues.) – Stephen Canon Aug 30 '13 at 14:59
  • Ah, yes. I've just disassembled some code with the old instructions, and IDA showed me the new ones instead. – Triang3l Aug 30 '13 at 14:59