/* do we have at least 2 words left? */ 1: adds r2, r2, #(16 - 2 + 2)
bmi 4f
/* finish off 2 words at a time */ 3: ldr r0, [r3], #4
ldr ip, [r1], #4
eors r0, r0, ip
bne 2f
subs r2, r2, #2
bhs 3b
/* are we done? */ 4: adds r2, r2, #2
bne 8f /* restore registers and return */
mov r0, #0
pop {r4, pc}
2: /* the last 2 words are different, restart them */
ldrh r0, [r3, #-4]
ldrh ip, [r1, #-4]
subs r0, r0, ip
ldrheq r0, [r3, #-2]
ldrheq ip, [r1, #-2]
subseq r0, r0, ip /* restore registers and return */
pop {r4, pc}
/* process the last few words */ 8: ldrh r0, [r3], #2
ldrh ip, [r1], #2
subs r0, r0, ip
bne 9f
subs r2, r2, #1
bne 8b
9: /* restore registers and return */
pop {r4, pc}
5: /*************** non-congruent case ***************/
/* align the unaligned pointer */
bic r1, r1, #3
ldr lr, [r1], #4 sub r2, r2, #8
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.