Subversion Repositories Kolibri OS

Rev

Rev 6088 | Rev 6131 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6088 Rev 6103
Line 971... Line 971...
971
    }
971
    }
Line 972... Line 972...
972
 
972
 
973
    return argc;
973
    return argc;
Line 974... Line -...
974
};
-
 
975
 
-
 
976
char *strstr(const char *cs, const char *ct)
-
 
977
{
-
 
978
int d0, d1;
-
 
979
register char *__res;
-
 
980
__asm__ __volatile__(
-
 
981
    "movl %6,%%edi\n\t"
-
 
982
    "repne\n\t"
-
 
983
    "scasb\n\t"
-
 
984
    "notl %%ecx\n\t"
-
 
985
    "decl %%ecx\n\t"    /* NOTE! This also sets Z if searchstring='' */
-
 
986
    "movl %%ecx,%%edx\n"
-
 
987
    "1:\tmovl %6,%%edi\n\t"
-
 
988
    "movl %%esi,%%eax\n\t"
-
 
989
    "movl %%edx,%%ecx\n\t"
-
 
990
    "repe\n\t"
-
 
991
    "cmpsb\n\t"
-
 
992
    "je 2f\n\t"     /* also works for empty string, see above */
-
 
993
    "xchgl %%eax,%%esi\n\t"
-
 
994
    "incl %%esi\n\t"
-
 
995
    "cmpb $0,-1(%%eax)\n\t"
-
 
996
    "jne 1b\n\t"
-
 
997
    "xorl %%eax,%%eax\n\t"
-
 
998
    "2:"
-
 
999
    : "=a" (__res), "=&c" (d0), "=&S" (d1)
-
 
1000
    : "0" (0), "1" (0xffffffff), "2" (cs), "g" (ct)
-
 
1001
    : "dx", "di");
-
 
Line 1002... Line 974...
1002
return __res;
974
};
1003
}
975
 
1004
 
976
 
1005
fb_get_options(const char *name, char **option)
977
fb_get_options(const char *name, char **option)