xword
xword
extend to word
Code: 23 FA
Description: Sign extend an N-bit signed number in Breg into a full word. To indicate
the value of N, bit N-1 of Areg is set to 1; all other bits must be 0.
Definition:
if (Areg is a not power of 2)
Areg′ ← undefined
else if (Areg = MostNeg)
Areg′ ← Breg
else if (Breg ≥ 0) and (Breg < Areg)
Areg′ ← Breg
else if (Breg ≥ Areg) and ((Breg >> 1) < Areg)
Areg′ ← Breg − (Areg << 1)
else
Areg′ ← undefined
– N is BitsPerWord
– Breg N bits and positive
– Breg N bits and negative
– Breg more than N bits
Breg′ ← Creg
Creg′ ← undefined
Error signals: none
Comments:
Secondary instruction.
See also: xbword xsword
205/212
®