Sometimes it is necessary to perform a change of the variable supplied through the third register: sllv $ s1, $ s2, $ s3 # s1 = s2 <s3 Implement the new sllv instruction using the real MIPS instructions.
: 0 31 (). $s3 32. "000 000... 0011111 = 0x1F. , $s3 .
sllv $s1,$s2,$s3
add $s1, $s2, $0
add $t0, $s3, $0
andi $t0, $t0, 0x1F
beq $t0, $0, EXIT
addi $t1, $0, 0
LOOP:
sll $s1, $s1, 1
addi $t1, $t1, 1
bne $t1, $t0, LOOP
EXIT:
, , , 32- 32 ( 36 4, ), , , .