Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSX? VMX? Altivec? VR? VSR?! How these PowerPC SIMD acronyms relate to each other?

Tags:

powerpc

I've a heard a lot about Altivec registers but I don't even find it on a POWER9 ISA. On that document I only find VR and VSR registers under Chapter 6 "Vector Facility" and Chapter 7 "Vector-Scalar Floating-Point Operations".

On ABI I noticed how the registers are physically allocated: Vector Registers as Part of VSRs

and I still didn't get why there are 2 groups. Is Altivec legacy?

As far as I understood, the following is what happened:

  1. Altivec / VMX (Vector Multimedia eXtensions) is an old SIMD technology for PowerPc. I see it as the old Intel MMX.
  2. The new VSX (Vector Scalar eXtensions) are an upgrade of it but to avoid breaking compatibility with Altivec, they remained 32 registers (VSR32-VSR63) only and Altivec operations can't handle the other VSR0-VSR31. The VSX instructions, however, can operate on all 64 registers (VSR0-VSR63). I see it as the new Intel SSE.

Is that correct?

like image 338
gut Avatar asked Sep 06 '17 17:09

gut


1 Answers

To clarify the terminology a little:

  • VMX is the earlier implementation of vector support for POWER/PowerPC processors.
  • Altivec is a trademark for VMX; functionally, it should be equivalent
  • VSX is a newer implementation of vector support for POWER processors

VSX adds more vector registers (32 more, but still 128-bits per register), and VSX-specific instructions. As you've found, the higher-numbered VSX registers are shared with those used for VMX operations. Therefore, it'd be inadvisable to mix VMX and VSX instructions in a single process, unless you're careful with register allocations.

I'm not too familiar with Intel's vector implementations, but your analogies sound correct to me.

like image 96
Jeremy Kerr Avatar answered Nov 17 '22 09:11

Jeremy Kerr