strcpy.S

Go to the documentation of this file.
00001 .globl strcpy
00002 strcpy:
00003         movl    4(%esp),%ecx            /* dst address */
00004         movl    8(%esp),%edx            /* src address */
00005         pushl   %ecx                    /* push dst address */
00006 
00007         .align 2,0x90
00008 L1:     movb    (%edx),%al              /* unroll loop, but not too much */
00009         movb    %al,(%ecx)
00010         testb   %al,%al
00011         je      L2
00012         movb    1(%edx),%al
00013         movb    %al,1(%ecx)
00014         testb   %al,%al
00015         je      L2
00016         movb    2(%edx),%al
00017         movb    %al,2(%ecx)
00018         testb   %al,%al
00019         je      L2
00020         movb    3(%edx),%al
00021         movb    %al,3(%ecx)
00022         testb   %al,%al
00023         je      L2
00024         movb    4(%edx),%al
00025         movb    %al,4(%ecx)
00026         testb   %al,%al
00027         je      L2
00028         movb    5(%edx),%al
00029         movb    %al,5(%ecx)
00030         testb   %al,%al
00031         je      L2
00032         movb    6(%edx),%al
00033         movb    %al,6(%ecx)
00034         testb   %al,%al
00035         je      L2
00036         movb    7(%edx),%al
00037         movb    %al,7(%ecx)
00038         addl    $8,%edx
00039         addl    $8,%ecx
00040         testb   %al,%al
00041         jne     L1
00042 L2:     popl    %eax                    /* pop dst address */
00043         ret
00044 

Generated on Fri Dec 15 11:18:55 2006 for UbixOS V2 by  doxygen 1.4.7