# This one should basically start from register 1 and fill each register up through register 8 with an "f" and register 9 will have "1e." (Under 100 cycles, inifnite loop at end.) sll $0, $0, 0 sll $0, $0, 0 sll $0, $0, 0 sll $0, $0, 0 or $1, $0, $0 # Ensure 0 in $1 or $2, $0, $0 # Ensure 0 in $2 or $3, $0, $0 # Ensure 0 in $3 or $4, $0, $0 # Ensure 0 in $4 or $5, $0, $0 # Ensure 0 in $5 or $6, $0, $0 # Ensure 0 in $6 or $7, $0, $0 # Ensure 0 in $7 or $8, $0, $0 # Ensure 0 in $8 or $9, $0, $0 # Ensure 0 in $9 sll $0, $0, 0 sll $0, $0, 0 sll $0, $0, 0 addiu $1, $0, 15 beq $1, $0, bad # Test forwarding to branch. sll $0, $0, 0 sll $0, $0, 0 sll $0, $0, 0 addiu $2, $0, 15 sll $0, $0, 0 beq $2, $0, bad sll $0, $0, 0 sll $0, $0, 0 sll $0, $0, 0 addiu $3, $0, 15 sll $0, $0, 0 sll $0, $0, 0 beq $3, $0, bad sll $0, $0, 0 addiu $4, $0, 15 beq $0, $4, bad # Test forwarding to branch. sll $0, $0, 0 sll $0, $0, 0 sll $0, $0, 0 addiu $5, $0, 15 sll $0, $0, 0 beq $0, $5, bad sll $0, $0, 0 sll $0, $0, 0 sll $0, $0, 0 addiu $6, $0, 15 sll $0, $0, 0 sll $0, $0, 0 beq $0, $6, bad sll $0, $0, 0 # Test branch delay sll $0, $0, 0 sll $0, $0, 0 beq $1, $2, test1 addiu $7, $0, 15 sll $0, $0, 0 sll $0, $0, 0 sll $0, $0, 0 addiu $7, $0, 10 sll $0, $0, 0 sll $0, $0, 0 sll $0, $0, 0 # Test not affecting instruction after delay slot test1: addiu $8, $0, 15 sll $0, $0, 0 sll $0, $0, 0 sll $0, $0, 0 beq $1, $2, test2 sll $0, $0, 0 addiu $8, $0, 10 sll $0, $0, 0 sll $0, $0, 0 sll $0, $0, 0 # Test not forwarding from branch. test2: beq $1, $2, test3 addu $9, $2, $2 # 1e sll $0, $0, 0 sll $0, $0, 0 sll $0, $0, 0 test3: beq $0, $0, test3 sll $0, $0, 0 bad: or $1, $0, $0 sll $0, $0, $0 sll $0, $0, $0 sll $0, $0, $0 sll $0, $0, $0 loop: beq $0, $0, loop sll $0, $0, 0