SARX/SHLX/SHRX — Shift Without Affecting FlagsInstruction Operand EncodingDescriptionShifts the bits of the first source operand (the second operand) to the left or right by a COUNT value specified in the second source operand (the third operand). The result is written to the destination operand (the first operand).The shift arithmetic right (SARX) and shift logical right (SHRX) instructions shift the bits of the destination operand to the right (toward less significant bit locations), SARX keeps and propagates the most significant bit (sign bit) while shifting.The logical shift left (SHLX) shifts the bits of the destination operand to the left (toward more significant bit loca-tions). This instruction is not supported in real mode and virtual-8086 mode. The operand size is always 32 bits if not in 64-bit mode. In 64-bit mode operand size 64 requires VEX.W1. VEX.W1 is ignored in non-64-bit modes. An attempt to execute this instruction with VEX.L not equal to 0 will cause #UD.If the value specified in the first source operand exceeds OperandSize -1, the COUNT value is masked.SARX,SHRX, and SHLX instructions do not update flags. OperationTEMP:= SRC1;IF VEX.W1 and CS.L = 1THENcountMASK:= 3FH;ELSEcountMASK:= 1FH;FICOUNT := (SRC2 AND countMASK)DEST[OperandSize -1] = TEMP[OperandSize -1];DO WHILE (COUNT ≠ 0)IF instruction is SHLXTHENDEST[] := DEST *2;Opcode/InstructionOp/ En64/32-bit ModeCPUID Feature FlagDescriptionVEX.LZ.F3.0F38.W0 F7 /rSARX r32a, r/m32, r32bRMVV/VBMI2Shift r/m32 arithmetically right with count specified in r32b.VEX.LZ.66.0F38.W0 F7 /rSHLX r32a, r/m32, r32bRMVV/VBMI2Shift r/m32 logically left with count specified in r32b.VEX.LZ.F2.0F38.W0 F7 /rSHRX r32a, r/m32, r32bRMVV/VBMI2Shift r/m32 logically right with count specified in r32b.VEX.LZ.F3.0F38.W1 F7 /rSARX r64a, r/m64, r64bRMVV/N.E.BMI2Shift r/m64 arithmetically right with count specified in r64b.VEX.LZ.66.0F38.W1 F7 /rSHLX r64a, r/m64, r64bRMVV/N.E.BMI2Shift r/m64 logically left with count specified in r64b.VEX.LZ.F2.0F38.W1 F7 /rSHRX r64a, r/m64, r64bRMVV/N.E.BMI2Shift r/m64 logically right with count specified in r64b.Op/EnOperand 1Operand 2Operand 3Operand 4RMVModRM:reg (w)ModRM:r/m (r)VEX.vvvv (r)NA
This UNOFFICIAL reference was generated from the official Intel® 64 and IA-32 Architectures Software Developer’s Manual by a dumb script. There is no guarantee that some parts aren't mangled or broken and is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.