OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [arch/] [s390x/] [lib/] [memset.S] - Rev 1765

Compare with Previous | Blame | View Log

/*
 *  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:
        LTGR    4,4
        JZ      memset_end
        LGR     0,2                    # save pointer to memory area
        LGR     1,3                    # move pad byte to R1
        LGR     3,4
        SGR     4,4                    # no source for MVCLE, only a pad byte
        SGR     5,5
        MVCLE   2,4,0(1)               # thats it, MVCLE is your friend
        JO      .-4
        LGR     2,0                    # return pointer to mem.
memset_end:
        BR      14
        

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.