projects
/
calu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
55385cb
)
isa/examples: adapted sum
author
Martin Perner
<martin@perner.cc>
Wed, 27 Oct 2010 18:17:28 +0000
(20:17 +0200)
committer
Martin Perner
<martin@perner.cc>
Wed, 27 Oct 2010 18:17:28 +0000
(20:17 +0200)
2_isa/src/sum.s
patch
|
blob
|
history
diff --git
a/2_isa/src/sum.s
b/2_isa/src/sum.s
index acafa3726fbb7792c0bf16a0168a3baa2af8dbf7..6ee9fa3dd6880ee8764245b177fb489f266bac2f 100644
(file)
--- a/
2_isa/src/sum.s
+++ b/
2_isa/src/sum.s
@@
-13,7
+13,8
@@
loop:
ldw r4, 0(r2);
;sum += arr[i];
add r0, r0, r4;
- subi r3, r3, 1;
- retze-;
addi r2, r2, 4;
- branch+ loop;
+ subi r3, r3, 1;
+ branchnz+ loop;
+
+ ret;