Changeset 1899


Ignore:
Timestamp:
Apr 24, 2005, 10:22:56 AM (20 years ago)
Author:
bird
Message:

Use some more registers.

Location:
trunk/src/emx/src/lib/str/386
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/src/lib/str/386/memcpy.s

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r1898 r1899  
    88/ {
    99/   size_t i;
    10 /   
     10/
    1111/   for (i = 0; i < n; ++i)
    1212/     ((char *)s1)[i] = ((char *)s2)[i];
     
    2525        pushl   %edi
    2626        movl    3*4(%esp), %edi         /* s1 */
     27        movl    %edi, %eax              /* return value */
    2728        movl    4*4(%esp), %esi         /* s2 */
    2829        movl    5*4(%esp), %ecx         /* n */
     30        movl    %ecx, %edx              /* save for later */
    2931        shrl    $2, %ecx
    3032        rep
    3133        movsl
    32         movl    5*4(%esp), %ecx         /* n */
     34        movl    %edx, %ecx              /* n */
    3335        andl    $3, %ecx
    3436        rep
    3537        movsb
    36         movl    3*4(%esp), %eax         /* s1 */
    3738        popl    %edi
    3839        popl    %esi
  • trunk/src/emx/src/lib/str/386/strcpy.s

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r1898 r1899  
    88/ {
    99/   char *dst;
    10 / 
     10/
    1111/   dst = string1;
    1212/   while ((*dst = *string2) != 0)
     
    2626        pushl   %edi
    2727        movl    3*4(%esp), %edi         /* string1 */
     28        movl    %edi, %edx              /* save for later */
    2829        movl    4*4(%esp), %esi         /* string2 */
    2930        ALIGN
     
    3233        testb   %al, %al
    3334        jnz     1b
    34         movl    3*4(%esp), %eax         /* string1 */
     35        movl    %edx, %eax              /* string1 */
    3536        popl    %edi
    3637        popl    %esi
Note: See TracChangeset for help on using the changeset viewer.