ENTRY(strcmp)
mov a3, a0 /* Check if the s1 addr is aligned. */
xor a2, a3, a1
andi a2, 0x3
bnez a2, 7f
andi t1, a0, 0x3
bnez t1, 5f
1: /* If aligned, load word each time. */
ldw t0, (a3, 0)
ldw t1, (a1, 0) /* If s1[i] != s2[i], goto 2f. */
cmpne t0, t1
bt 2f /* If s1[i] == s2[i], check if s1 or s2 is at the end. */
tstnbz t0 /* If at the end, goto 3f (finish comparing). */
bf 3f
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.