| version 1.7, 2002/08/16 20:31:43 |
version 1.8, 2002/08/16 20:42:35 |
| Line 21 static int align(const int n) |
|
| Line 21 static int align(const int n) |
|
| return ((n >> 3) + (n % 8 != 0)) << 3; |
return ((n >> 3) + (n % 8 != 0)) << 3; |
| } |
} |
| |
|
| char *FUNCTION(strcpymmx)(void *dest, const void *src) |
char *FUNCTION(strcpymmx)(void *dest, const void *src) |
| { |
{ |
| int len = strlen(src); |
int len = strlen(src); |
| char *ret = memcpymmx(dest, src, len); |
char *ret = memcpymmx(dest, src, len); |
| Line 29 static int align(const int n) |
|
| Line 29 static int align(const int n) |
|
| return ret; |
return ret; |
| } |
} |
| |
|
| char *FUNCTION(strncpymmx)(void *dest, const void *src, size_t n) |
char *FUNCTION(strncpymmx)(void *dest, const void *src, size_t n) |
| { |
{ |
| char *ret = memcpymmx(dest, src, n); |
char *ret = memcpymmx(dest, src, n); |
| ret[n] = '\0'; |
ret[n] = '\0'; |
| return ret; |
return ret; |
| } |
} |
| |
|
| void *FUNCTION(memcpymmx)(void *dest, const void *src, size_t n) |
void *FUNCTION(memcpymmx)(void *dest, const void *src, size_t n) |
| { |
{ |
| if ((n % 8) != 0) |
if ((n % 8) != 0) |
| n = align(n); |
n = align(n); |
| Line 51 static int align(const int n) |
|
| Line 51 static int align(const int n) |
|
| return dest; |
return dest; |
| } |
} |
| |
|
| void *FUNCTION(memsetmmx)(void *s, int c, size_t n) |
void *FUNCTION(memsetmmx)(void *s, int c, size_t n) |
| { |
{ |
| char set[8]; |
char set[8]; |
| set[0] = set[1] = set[2] = set[3] = set[4] = set[5] = set[6] = set[7] = c; |
set[0] = set[1] = set[2] = set[3] = set[4] = set[5] = set[6] = set[7] = c; |
| Line 68 static int align(const int n) |
|
| Line 68 static int align(const int n) |
|
| } |
} |
| |
|
| /* function returns only 1 or 0 */ |
/* function returns only 1 or 0 */ |
| int FUNCTION(memcmpmmx)(const void *s1, const void *s2, size_t n) |
int FUNCTION(memcmpmmx)(const void *s1, const void *s2, size_t n) |
| { |
{ |
| if ((n % 8) != 0) |
if ((n % 8) != 0) |
| n = align(n); |
n = align(n); |