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

Subversion Repositories or1k

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1008 ivang
/*
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 (strlen)
14
       SOTYPE_FUNCTION(strlen)
15
 
16
SYM (strlen):
17
 
18
        pushl ebp
19
        movl esp,ebp
20
        pushl edi
21
        movl 8(ebp),edx
22
 
23
        cld
24
        movl edx,edi
25
        movl $4294967295,ecx
26
        xor eax,eax
27
        repnz
28
        scasb
29
        subl edx,edi
30
        leal -1(edi),eax
31
 
32
        leal -4(ebp),esp
33
        popl edi
34
        leave
35
        ret

powered by: WebSVN 2.1.0

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