是否有任何简单的方法可以将32位寄存器的值分成2个带符号的短裤(16位)。我想到了:
#t0 holds the 32bit value containing the 2 signed shorts
sra $v0, $t0, 16 #extract the 1st signed short and put it in v0
li $t1, 0xffff #create a mask
and $v1, $t0, $t1 #extract the 2nd signed short and put it in v1
但是那会破坏第二个值的符号,对吗?是否有一种简单的方法,不涉及在另一个寄存器中屏蔽2值的符号并将其移到v1之后?