SHR
Operation
Logical-right-shifts the destination by the count modulo its selected width without changing FLAGS.
Assembler Syntax
SHR.{L|Q}(z) Rn(s), Rn(d)
SHR.{B|W|L|Q}(z) Rn(s), <ea>(e)
SHR.{B|W|L|Q}(z) imm6(i), <ea>(e)
Privilege
Unprivileged
Repeat eligibility
REP eligible; REPcc observes dst
Shifts the selected-width destination value right by the effective count, zero-fills the vacated high bits, and writes the result to the destination. The effective count is the count operand modulo the selected operand width: B uses mod 8, W uses mod 16, L uses mod 32, and Q uses mod 64. If the effective count is zero, the selected-width result equals the original selected-width value; an Rn destination is still written and a sub-Q result is zero-extended to 64 bits, while a memory destination rewrites the same selected bytes. FLAGS are unchanged for all counts.
2.75in
Encodings
SHR.{L|Q}(z) Rn(s), Rn(d)
Format: Instruction format for SHR.{L|Q}(z) Rn(s), Rn(d)
2.75in SHR.{B|W|L|Q}(z) Rn(s), <ea>(e)
Format: Instruction format for SHR.{B|W|L|Q}(z) Rn(s), <ea>(e)
dst — excluded: immediate [invalid_destination]
2.75in SHR.{B|W|L|Q}(z) imm6(i), <ea>(e)
Format: Instruction format for SHR.{B|W|L|Q}(z) imm6(i), <ea>(e)
dst — excluded: immediate [invalid_destination]