/*1* Simplistic strlen() implementation for SHmedia.2*3* Copyright (C) 2003 Paul Mundt <[email protected]>4*/56.section .text..SHmedia32,"ax"7.globl strlen8.type strlen,@function910.balign 1611strlen:12ptabs r18, tr41314/*15* Note: We could easily deal with the NULL case here with a simple16* sanity check, though it seems that the behavior we want is to fault17* in the event that r2 == NULL, so we don't bother.18*/19/* beqi r2, 0, tr4 */ ! Sanity check2021movi -1, r022pta/l loop, tr023loop:24ld.b r2, 0, r125addi r2, 1, r226addi r0, 1, r027bnei/l r1, 0, tr02829or r0, r63, r230blink tr4, r633132.size strlen,.-strlen333435