Author: Gerd Isenberg
Date: 02:46:55 09/27/02
Go up one level in this thread
On September 27, 2002 at 04:57:10, Tim Foden wrote: >On September 27, 2002 at 04:48:03, Gerd Isenberg wrote: > >>from: >> >> AMD x86-64 Architecture >> Programmer’s Manual >> Volume 4: >> 128-Bit Media Instructions >> >>=============================================================================== >>PSLLDQ Packed Shift Left Logical Double Quadword >> >>Left-shifts the 128-bit (double quadword) value in an XMM register by the >>number of bytes specified in an immediate byte value. The low-order bytes that >>are emptied by the shift operation are cleared to 0. If the shift value is >>greater than 15, the destination XMM register is cleared to all 0s. >> >>PSRLDQ Packed Shift Right Logical Double Quadword >> >>Right-shifts the 128-bit (double quadword) value in an XMM register by the >>number of bytes specified in an immediate byte value. The high-order bytes that >>are emptied by the shift operation are cleared to 0. If the shift value is >>greater than 15, the destination XMM register is cleared to all 0s. >>=============================================================================== >> >>Same instructions are already available on Intel's PIV with SSE2. >>I'll hope that "is greater than 15" is a typo or erroneous copied from PSLLW. >>It should be 127 here. > >If you read what it says... it shifts by a BYTE at a time, not a BIT at a time. >So the maximum shift is by 15 BYTES. :) > >Cheers, Tim. > Thanks, Tim. Aha, Shifting bytewise? So there is no way to shift 128bits bitwise. I love this stringent instructions. from AMD x86-64 Architecture Programmer’s Manual Volume 1: Application Programming Chapter 4: 128-Bit Media and Scientific Programming The PSRLDQ instruction differs from the other three right-shift instructions because it operates on bytes rather than bits. It right-shifts the 128-bit (double quadword) value in an XMM register by the number of bytes specified in an immediate byte value. PSRLDQ can be used, for example, to move the high 8 bytes of an XMM register to the low 8 bytes of the register. In some implementations, however, PUNPCKHQDQ may be a better choice for this operation. Gerd >>Can anybody confirm this for PIV? >> >>Regards, >>Gerd
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.