patch-2.2.14 linux/arch/s390/lib/memset.S
Next file: linux/arch/s390/lib/strcmp.S
Previous file: linux/arch/s390/lib/delay.c
Back to the patch index
Back to the overall index
- Lines: 31
- Date:
Tue Jan 4 10:12:12 2000
- Orig file:
v2.2.13/linux/arch/s390/lib/memset.S
- Orig date:
Wed Dec 31 16:00:00 1969
diff -u --recursive --new-file v2.2.13/linux/arch/s390/lib/memset.S linux/arch/s390/lib/memset.S
@@ -0,0 +1,30 @@
+/*
+ * arch/s390/lib/memset.S
+ * S390 fast memset routine
+ *
+ * S390 version
+ * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
+ * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com),
+ */
+
+/*
+ * R2 = address to memory area
+ * R3 = byte to fill memory with
+ * R4 = number of bytes to fill
+ */
+ .globl memset
+memset:
+ LTR 4,4
+ JZ memset_end
+ LR 0,2 # save pointer to memory area
+ LR 1,3 # move pad byte to R1
+ LR 3,4
+ SR 4,4 # no source for MVCLE, only a pad byte
+ SR 5,5
+ MVCLE 2,4,0(1) # thats it, MVCLE is your friend
+ JO .-4
+ LR 2,0 # return pointer to mem.
+memset_end:
+ BR 14
+
+
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)