From a6abe77e9fb147ea93898df7fb5c2c2185c6bcd9 Mon Sep 17 00:00:00 2001 From: Pavel Pisa <pisa@cmp.felk.cvut.cz> Date: Sun, 13 Oct 2024 08:42:22 +0200 Subject: [PATCH] eminaries/qtrvsim/branchpred-1: add for loops alternative to the code Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz> --- seminaries/qtrvsim/branchpred-1/branchpred-1.S | 1 + 1 file changed, 1 insertion(+) diff --git a/seminaries/qtrvsim/branchpred-1/branchpred-1.S b/seminaries/qtrvsim/branchpred-1/branchpred-1.S index f7f72f3..cc55ae5 100644 --- a/seminaries/qtrvsim/branchpred-1/branchpred-1.S +++ b/seminaries/qtrvsim/branchpred-1/branchpred-1.S @@ -1,6 +1,7 @@ .globl _start # i = s0, j = s1, c = s2, t0 = outer loop limits, t1 = inner loop limit, t3 - auxiliary variable +# c = 0; for ( i = 0; i < 4; i++) for ( j = 0; i < 5; j++) c++; # c, i, j = 0; do { do { c++ } while(++j < 5) } while(i < 4); _start: -- GitLab