File: memset.S

package info (click to toggle)
kernel-image-2.4.17-hppa 32.4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 156,356 kB
  • ctags: 442,585
  • sloc: ansic: 2,542,442; asm: 144,771; makefile: 8,468; sh: 3,097; perl: 2,578; yacc: 1,177; tcl: 577; lex: 352; awk: 251; lisp: 218; sed: 72
file content (30 lines) | stat: -rw-r--r-- 849 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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