/*1* linux/arch/arm/lib/strnlen_user.S2*3* Copyright (C) 1995-2000 Russell King4*5* This program is free software; you can redistribute it and/or modify6* it under the terms of the GNU General Public License version 2 as7* published by the Free Software Foundation.8*/9#include <linux/linkage.h>10#include <asm/assembler.h>11#include <asm/errno.h>1213.text14.align 51516/* Prototype: unsigned long __strnlen_user(const char *str, long n)17* Purpose : get length of a string in user memory18* Params : str - address of string in user memory19* Returns : length of string *including terminator*20* or zero on exception, or n + 1 if too long21*/22ENTRY(__strnlen_user)23mov r2, r0241:25ldrusr r3, r0, 126teq r3, #027beq 2f28subs r1, r1, #129bne 1b30add r0, r0, #1312: sub r0, r0, r232mov pc, lr33ENDPROC(__strnlen_user)3435.pushsection .fixup,"ax"36.align 0379001: mov r0, #038mov pc, lr39.popsection404142