seh
Sign extend halfword
Copies the low 16 bits of $t2 into $t1, with bit 15 replicated through the upper 16 bits.
Forms
seh ,
Operands
$t1- Any general-purpose register,
$0to$31, using its numeric or named spelling, such as$8or$t0($zerois$0;$rais$31). $t2- A general-purpose register. It may be the same register as
$t1.
Turns a halfword loaded with 'lhu' back into a signed value.
# Apply seh to initialized pattern 0x80FF. Inspect $t2: 0xFFFF80FF.
li $t0, 0x80FF
seh $t2, $t0