Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simple copy loop
# r0=temp
# r1=source ptr (unaligned)
# r2=dest ptr (aligned)
# r3=number of words to copy
lp: lwr r0, 3(r1) # <-- this ends up having a false dependency on r0 from the previous iter
lwl r0, 0(r1)
sw r0, 0(r2)
addiu r1, r1, 4
addiu r2, r2, 4
addiu r3, r3, -1
bgtz r3, lp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment