/*1* This file is subject to the terms and conditions of the GNU General Public2* License. See the file "COPYING" in the main directory of this archive3* for more details.4*5* Copyright (c) 1996, 1998, 1999, 2004 by Ralf Baechle6* Copyright (c) 1999 Silicon Graphics, Inc.7*/8#include <asm/asm.h>9#include <asm/asm-offsets.h>10#include <asm/regdef.h>1112#define EX(insn,reg,addr,handler) \139: insn reg, addr; \14.section __ex_table,"a"; \15PTR 9b, handler; \16.previous1718/*19* Return the size of a string (including the ending 0)20*21* Return 0 for error22*/23LEAF(__strlen_user_asm)24LONG_L v0, TI_ADDR_LIMIT($28) # pointer ok?25and v0, a026bnez v0, .Lfault2728FEXPORT(__strlen_user_nocheck_asm)29move v0, a0301: EX(lb, t0, (v0), .Lfault)31PTR_ADDIU v0, 132bnez t0, 1b33PTR_SUBU v0, a034jr ra35END(__strlen_user_asm)3637.Lfault: move v0, zero38jr ra394041