diff --git a/Golang-ppc64x-asm-Reference.md b/Golang-ppc64x-asm-Reference.md index 692384a..9bde294 100644 --- a/Golang-ppc64x-asm-Reference.md +++ b/Golang-ppc64x-asm-Reference.md @@ -142,6 +142,31 @@ For **ppc64**, the IBM POWER5, POWER6, POWER7, and POWER8 processors are commonl For **ppc64le**, the IBM POWER8 and POWER9 processors are typically used. The switch to little-endian mode in these processors was made to improve compatibility with software written for x86_64, which also uses little-endian byte order. These processors are used in a variety of applications, from supercomputers to servers for cloud and data analytics workloads. +# AltiVec & VSX +VSX (Vector-Scalar Extension) and AltiVec (also known as VMX - Vector Multimedia Extension) are both vector processing extensions to the PowerPC architecture, but they have different features and capabilities. + +### AltiVec (VMX) +- **Introduction**: AltiVec was introduced by Motorola (now NXP) and IBM in the late 1990s. +- **Registers**: AltiVec provides 32 vector registers, each 128 bits wide. +- **Data Types**: AltiVec supports operations on various data types, including 8-bit, 16-bit, and 32-bit integers, as well as single-precision floating-point numbers. +- **Instruction Set**: AltiVec includes a wide range of instructions for arithmetic, logical, permute, and data movement operations. +- **Usage**: AltiVec is commonly used in multimedia, signal processing, and other applications that benefit from SIMD (Single Instruction, Multiple Data) parallelism. + +### VSX (Vector-Scalar Extension) +- **Introduction**: VSX was introduced by IBM in the PowerISA 2.06 specification, starting with the POWER7 processor. +- **Registers**: VSX extends the existing floating-point registers (FPRs) and vector registers (VRs) to create a unified set of 64 registers, each 128 bits wide. The first 32 registers overlap with the FPRs, and the second 32 registers overlap with the VRs. +- **Data Types**: VSX supports operations on a wider range of data types, including 8-bit, 16-bit, 32-bit, and 64-bit integers, as well as single-precision and double-precision floating-point numbers. +- **Instruction Set**: VSX includes an expanded set of instructions that build on the capabilities of AltiVec, adding more advanced arithmetic, logical, and data movement operations. +- **Usage**: VSX is designed to enhance the performance of scientific computing, cryptography, and other applications that require high-performance vector and scalar processing. + +### Key Differences +1. **Registers**: AltiVec has 32 dedicated vector registers, while VSX extends the existing FPRs and VRs to create a unified set of 64 registers. +2. **Data Types**: VSX supports a broader range of data types, including 64-bit integers and double-precision floating-point numbers, which are not supported by AltiVec. +3. **Instruction Set**: VSX includes more advanced instructions compared to AltiVec, providing greater flexibility and performance for certain applications. +4. **Compatibility**: VSX is backward compatible with AltiVec, meaning that code written for AltiVec can run on processors with VSX support, but the reverse is not necessarily true. + +In summary, VSX is a more advanced and flexible extension compared to AltiVec, offering enhanced capabilities for high-performance computing applications. + # what's the difference between function definition in golang asm with funcname<>(SB), funcname(SB) and ·funcname(SB)? In Go assembly, the naming conventions for function definitions are as follows: