diff --git a/seminaries/qtrvsim/hazards-from-lecture/alu-hazards.S b/seminaries/qtrvsim/hazards-from-lecture/alu-hazards.S new file mode 100644 index 0000000000000000000000000000000000000000..415ed2528bd116f29f0cbcaf344d6af543d3f67e --- /dev/null +++ b/seminaries/qtrvsim/hazards-from-lecture/alu-hazards.S @@ -0,0 +1,10 @@ + li s1, 0x11111111 + li s2, 0x22222222 + li s3, 0x33333333 + li s4, 0x44444444 + li s5, 0x55555555 + + add s0, s2, s3 + and t0, s0, s1 + or t1, s4, s0 + sub t2, s0, s5 diff --git a/seminaries/qtrvsim/hazards-from-lecture/beq-hazards.S b/seminaries/qtrvsim/hazards-from-lecture/beq-hazards.S new file mode 100644 index 0000000000000000000000000000000000000000..80cb5021c490cf28c4b94297a9049b889967814d --- /dev/null +++ b/seminaries/qtrvsim/hazards-from-lecture/beq-hazards.S @@ -0,0 +1,15 @@ + li s1, 0x11111111 + li s2, 0x22222222 + li s3, 0x33333333 + li s4, 0x44444444 + li s5, 0x55555555 + addi t1, zero, 0x123 + addi t2, zero, 0x123 + + beq t1, t2, skip + and t0, s0, s1 + or t1, s4, s0 + sub t2, s0, s5 + +skip: + slt t3, s2, s3 diff --git a/seminaries/qtrvsim/hazards-from-lecture/lw-hazards.S b/seminaries/qtrvsim/hazards-from-lecture/lw-hazards.S new file mode 100644 index 0000000000000000000000000000000000000000..4245556cefde98fff624ecbcd3f796fb5ebb1c5b --- /dev/null +++ b/seminaries/qtrvsim/hazards-from-lecture/lw-hazards.S @@ -0,0 +1,13 @@ + li s1, 0x11111111 + li s2, 0x22222222 + li s3, 0x33333333 + li s4, 0x44444444 + li s5, 0x55555555 + + lw s0, 40(0) + and t0, s0, s1 + or t1, s4, s0 + sub t2, s0, s5 + +.org 40 + .word 0x12345678