4. Data shuffling Instruction Set
UnpckhpsXMM, XMM/m128
The source memory and destination register are 64-bitDouble-CharacterThe result is sent to the destination register. The memory variables must be 16 bytes aligned with the memory.
High 64-bit | low 64-bit
Destination register: A0 | A1 | A2 | A3
Source memory: B0 | B1 | B2 | B3
Destination register result: B0 | A0 | B1 | A1
Example:
When xmm0 = 0x 0c517e000 44290000 46b6d000 3c4985f0
Xmm1 = 0x 045e510004240 CCCD 4a59e540 3a77b9e0,
When unpckhps xmm0 and xmm1 are executed
Xmm0 = 0x 045e51000 c517e000 4240 CCCD 44290000
UnpcklpsXMM, XMM/m128
Source memory and destination register 64-bit lowDouble-CharacterThe result is sent to the destination register. The memory variables must be 16 bytes aligned with the memory.
High 64-bit | low 64-bit
Destination register: A0 | A1 | A2 | A3
Source memory: B0 | B1 | B2 | B3
Destination register result: B2 | A2 | B3 | A3
Example:
When xmm0 = 0x 0c517e000 44290000 46b6d000 3c4985f0
Xmm1 = 0x 045e510004240 CCCD 4a59e540 3a77b9e0,
Run unpcklps xmm0, xmm1
Then xmm0 = 0x 04a59e540 46b6d000 3a77b9e0 3c4985f0
5. commands for converting Single-precision floating-point numbers and Integers
Cvtpi2psXMM, mm/M64
The 64-bit two 32-Bit Signed (complement) integers in the source memory are converted into two single-precision floating-point numbers, which are placed in the destination register 64 lower, and the 64-bit height remains unchanged.
The source register is 'mm', not 'xmm'
Cvtsi2ssXMM, R32/M32
One 32-Bit Signed (complement) integer in the source memory is converted into one single-precision floating point number, which is placed into the destination register 32 lower, and the 96-bit height remains unchanged.
Cvtps2piMm, XMM/M64
Convert two 32-Bit Single-precision floating point numbers (64-bit) in the source memory into two 32-bit signed integers and place them in the destination register.
Cvtss2siR32, XMM/M32
Convert a 32-bit low 32-Bit Single-precision floating point number in the source memory into a 32-bit signed integer and place it in the destination register.