# Integer 1 -> $a0
# Integer 2 -> $a1
# Result -> $a3
# Setting up retreiving mask
xor $t0, $t0, $t0
lui $t0, 0x8000
# Extracting MSB
and $t1, $a0, $t0
# Moving MSB to LSB
srl $t1, $t1, 31
# Setting up setting mask
xor $t0, $t0, $t0
li $t0, 0x0001
# Applying r = a ^ ((a ^ b) & mask)
# a = $a1
# b = $t1
# mask = $t0
xor $t2, $a1, $t1
and $t2, $t2, $t0
xor $a3, $a1, $t2
Сборка это весело!