ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / arch / s390 / lib / memset.S
1 /*
2  *  arch/s390/lib/memset.S
3  *    S390 fast memset routine
4  *
5  *  S390 version
6  *    Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
7  *    Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com),
8  */
9
10 /*
11  * R2 = address to memory area
12  * R3 = byte to fill memory with
13  * R4 = number of bytes to fill
14  */
15         .globl  memset
16 memset:
17         LTR     4,4
18         JZ      memset_end
19         LR      0,2                    # save pointer to memory area
20         LR      1,3                    # move pad byte to R1
21         LR      3,4
22         SR      4,4                    # no source for MVCLE, only a pad byte
23         SR      5,5
24         MVCLE   2,4,0(1)               # thats it, MVCLE is your friend
25         JO      .-4
26         LR      2,0                    # return pointer to mem.
27 memset_end:
28         BR      14
29         
30