patch-2.4.4 linux/arch/ia64/lib/strnlen_user.S
Next file: linux/arch/ia64/lib/swiotlb.c
Previous file: linux/arch/ia64/lib/strncpy_from_user.S
Back to the patch index
Back to the overall index
- Lines: 49
- Date:
Thu Apr 5 12:51:47 2001
- Orig file:
v2.4.3/linux/arch/ia64/lib/strnlen_user.S
- Orig date:
Thu Jun 22 07:09:44 2000
diff -u --recursive --new-file v2.4.3/linux/arch/ia64/lib/strnlen_user.S linux/arch/ia64/lib/strnlen_user.S
@@ -8,41 +8,28 @@
* in1: string length limit N
* Outputs:
* r8: 0 in case of fault, strlen(buffer)+1 otherwise
- *
- * Copyright (C) 1999 David Mosberger-Tang <davidm@hpl.hp.com>
+ *
+ * Copyright (C) 1999, 2001 David Mosberger-Tang <davidm@hpl.hp.com>
*/
#include <asm/asmmacro.h>
-/* If a fault occurs, r8 gets set to -EFAULT and r9 gets cleared. */
-#define EX(x...) \
- .section __ex_table,"a"; \
- data4 @gprel(99f); \
- data4 (.Lexit-99f)|1; \
- .previous \
-99: x;
-
- .text
- .psr abi64
- .psr lsb
- .lsb
-
GLOBAL_ENTRY(__strnlen_user)
- UNW(.prologue)
+ .prologue
alloc r2=ar.pfs,2,0,0,0
- UNW(.save ar.lc, r16)
+ .save ar.lc, r16
mov r16=ar.lc // preserve ar.lc
- UNW(.body)
+ .body
add r3=-1,in1
;;
mov ar.lc=r3
mov r9=0
-
+ ;;
// XXX braindead strlen loop---this needs to be optimized
.Loop1:
- EX(ld1 r8=[in0],1)
+ EXCLR(.Lexit, ld1 r8=[in0],1)
add r9=1,r9
;;
cmp.eq p6,p0=r8,r0
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)