03.03.2013 Views

Intel® Architecture Instruction Set Extensions Programming Reference

Intel® Architecture Instruction Set Extensions Programming Reference

Intel® Architecture Instruction Set Extensions Programming Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

INSTRUCTION SET REFERENCE<br />

128-bit Legacy SSE version: The first source and destination operands are XMM registers. The second source<br />

operand is an XMM register or a 128-bit memory location. Bits (255:128) of the corresponding YMM destination<br />

register remain unchanged.<br />

VEX.128 encoded version: The first source and destination operands are XMM registers. The second source<br />

operand is an XMM register or a 128-bit memory location. Bits (255:128) of the corresponding YMM register are<br />

zeroed.<br />

VEX.256 encoded version: The first source and destination operands are YMM registers. The second source<br />

operand is an YMM register or a 256-bit memory location.<br />

Operation<br />

BYTE_SIGN_256b(SRC1, SRC2)<br />

if (SRC2[7..0] < 0 )<br />

DEST[7...0] Neg(SRC1[7...0])<br />

else if(SRC2[7..0] == 0 )<br />

DEST[7...0] 0<br />

else if(SRC2[7..0] > 0 )<br />

DEST[7...0] SRC1[7...0]<br />

Repeat operation for 2nd through 31th bytes<br />

if (SRC2[255...248] < 0 )<br />

DEST[255...248] Neg(SRC1[255...248])<br />

else if(SRC2[255...248] == 0 )<br />

DEST[255...248] 0<br />

else if(SRC2[255...248] > 0 )<br />

DEST[255...248] SRC1[255...248]<br />

BYTE_SIGN(SRC1, SRC2)<br />

if (SRC2[7..0] < 0 )<br />

DEST[7...0] Neg(SRC1[7...0])<br />

else if(SRC2[7..0] == 0 )<br />

DEST[7...0] 0<br />

else if(SRC2[7..0] > 0 )<br />

DEST[7...0] SRC1[7...0]<br />

Repeat operation for 2nd through 15th bytes<br />

if (SRC2[127..120] < 0 )<br />

DEST[127...120] Neg(SRC1[127...120])<br />

else if(SRC2[127.. 120] == 0 )<br />

DEST[127...120] 0<br />

else if(SRC2[127.. 120] > 0 )<br />

DEST[127...120] SRC1[127...120]<br />

WORD_SIGN_256b(SRC1, SRC2)<br />

if (SRC2[15..0] < 0 )<br />

DEST[15...0] Neg(SRC1[15...0])<br />

else if(SRC2[15..0] == 0 )<br />

DEST[15...0] 0<br />

else if(SRC2[15..0] > 0 )<br />

DEST[15...0] SRC1[15...0]<br />

Repeat operation for 2nd through 15th words<br />

if (SRC2[255..240] < 0 )<br />

DEST[255..240] Neg(SRC1[255..240])<br />

else if(SRC2[255..240] == 0 )<br />

DEST[255..240] 0<br />

else if(SRC2[255..240] > 0 )<br />

Ref. # 319433-014 5-129

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!