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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [newlib/] [libc/] [machine/] [i386/] [memset.S] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 56 joel
/*
2
 * ====================================================
3
 * Copyright (C) 1998 by Cygnus Solutions. All rights reserved.
4
 *
5
 * Permission to use, copy, modify, and distribute this
6
 * software is freely granted, provided that this notice
7
 * is preserved.
8
 * ====================================================
9
 */
10
 
11
        #include "i386mach.h"
12
 
13
        .global SYM (memset)
14
 
15
SYM (memset):
16
 
17
        pushl ebp
18
        movl esp,ebp
19
        pushl edi
20
        pushl ebx
21
        movl 8(ebp),edi
22
        movl 12(ebp),eax
23
        movl 16(ebp),ecx
24
        cld
25
 
26
#ifndef __OPTIMIZE_SIZE__
27
        andl $255,eax
28
        movl ecx,ebx
29
        testl $3,edi
30
        jne .L19
31
        cmpl $16,ecx
32
        jbe .L19
33
 
34
        movl eax,edx
35
        sall $8,eax
36
        orl edx,eax
37
 
38
        movl eax,edx
39
        sall $16,edx
40
        orl edx,eax
41
 
42
        shrl $2,ecx
43
        andl $3,ebx
44
        rep
45
        stosl
46
        movl ebx,ecx
47
#endif /* not __OPTIMIZE_SIZE__ */
48
 
49
.L19:
50
        rep
51
        stosb
52
 
53
        movl 8(ebp),eax
54
 
55
        leal -8(ebp),esp
56
        popl ebx
57
        popl edi
58
        leave
59
        ret

powered by: WebSVN 2.1.0

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