# # simple example of a few instructions. # evaluates if (r10 >= r9 ) { r10 <- r10 - r9 - r8*2 } # r10 = $t2, r9 = $t1, r8 = $t0 # We assume r11 has 0x1 in it. # r11 = $t3 .text main: slt $t4, $t2, $t1 bne $t4, $0, skip sub $t2, $t2, $t1 sllv $t4, $t1, $t3 sub $t2, $t2, $t4 skip: # Produces # 00000000 0x0149602a: slt $t4, $t2, $t1 # 00000004 0x140c0003: bne $t4, $0, 3 # 00000008 0x01495022: sub $t2, $t2, $t1 # 0000000c 0x012b6004: sllv $t4, $t1, $t3 # 00000010 0x014c5022: sub $t2, $t2, $t4