shr
指令型別 I
格式
(qp) shr r1 = r3, r2 signed_form
(qp) shr.u r1 = r3, r2 unsigned_form
(qp) shr r1 = r3, count6 pseudo-op of: (qp) extr r1 = r3, count6, 64–count6
(qp) shr.u r1 = r3, count6 pseudo-op of: (qp) extr.u r1 = r3, count6, 64–count6
說明
GRr3 中的值右移,然後放入 GR r1。在 signed_form 中,騰出的空位用 GR r3 中的位 63 填充;在 unsigned_form 中,騰出的空位用零填充。要移位的位數由 GR r2 中的值或立即數 count6 指定。移位量解釋為無符號數字。如果 GR r2 中的值大於 63,結果為全零(對於 unsigned_form 或如果 GR r3 的位 63 為 0),或結果為全一(對於 signed_form 或如果 GR r3 的位 63 為 1)。
如果指定 .u 完成符,則移位是無符號(邏輯)的,否則是有符號(算術)的。
對於立即數形式,請參閱提取 (extr) 指令。