Commit 3492cdf0 authored by Paolo Ciarrocchi's avatar Paolo Ciarrocchi Committed by Ingo Molnar

x86: coding style fixes to arch/x86/lib/string_32.c

Before:
total: 21 errors, 0 warnings, 237 lines checked

After:
total: 0 errors, 0 warnings, 237 lines checked

paolo@paolo-desktop:~/linux.trees.git$ md5sum /tmp/string_32.o.*
c55d059ef1612b32a8bb2771a72ae0d5  /tmp/string_32.o.after
c55d059ef1612b32a8bb2771a72ae0d5  /tmp/string_32.o.before
Signed-off-by: default avatarPaolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 209b580f
...@@ -22,7 +22,7 @@ char *strcpy(char *dest, const char *src) ...@@ -22,7 +22,7 @@ char *strcpy(char *dest, const char *src)
"testb %%al,%%al\n\t" "testb %%al,%%al\n\t"
"jne 1b" "jne 1b"
: "=&S" (d0), "=&D" (d1), "=&a" (d2) : "=&S" (d0), "=&D" (d1), "=&a" (d2)
:"0" (src), "1" (dest) : "memory"); : "0" (src), "1" (dest) : "memory");
return dest; return dest;
} }
EXPORT_SYMBOL(strcpy); EXPORT_SYMBOL(strcpy);
...@@ -42,7 +42,7 @@ char *strncpy(char *dest, const char *src, size_t count) ...@@ -42,7 +42,7 @@ char *strncpy(char *dest, const char *src, size_t count)
"stosb\n" "stosb\n"
"2:" "2:"
: "=&S" (d0), "=&D" (d1), "=&c" (d2), "=&a" (d3) : "=&S" (d0), "=&D" (d1), "=&c" (d2), "=&a" (d3)
:"0" (src), "1" (dest), "2" (count) : "memory"); : "0" (src), "1" (dest), "2" (count) : "memory");
return dest; return dest;
} }
EXPORT_SYMBOL(strncpy); EXPORT_SYMBOL(strncpy);
...@@ -60,7 +60,7 @@ char *strcat(char *dest, const char *src) ...@@ -60,7 +60,7 @@ char *strcat(char *dest, const char *src)
"testb %%al,%%al\n\t" "testb %%al,%%al\n\t"
"jne 1b" "jne 1b"
: "=&S" (d0), "=&D" (d1), "=&a" (d2), "=&c" (d3) : "=&S" (d0), "=&D" (d1), "=&a" (d2), "=&c" (d3)
: "0" (src), "1" (dest), "2" (0), "3" (0xffffffffu): "memory"); : "0" (src), "1" (dest), "2" (0), "3" (0xffffffffu) : "memory");
return dest; return dest;
} }
EXPORT_SYMBOL(strcat); EXPORT_SYMBOL(strcat);
...@@ -105,9 +105,9 @@ int strcmp(const char *cs, const char *ct) ...@@ -105,9 +105,9 @@ int strcmp(const char *cs, const char *ct)
"2:\tsbbl %%eax,%%eax\n\t" "2:\tsbbl %%eax,%%eax\n\t"
"orb $1,%%al\n" "orb $1,%%al\n"
"3:" "3:"
:"=a" (res), "=&S" (d0), "=&D" (d1) : "=a" (res), "=&S" (d0), "=&D" (d1)
:"1" (cs), "2" (ct) : "1" (cs), "2" (ct)
:"memory"); : "memory");
return res; return res;
} }
EXPORT_SYMBOL(strcmp); EXPORT_SYMBOL(strcmp);
...@@ -130,9 +130,9 @@ int strncmp(const char *cs, const char *ct, size_t count) ...@@ -130,9 +130,9 @@ int strncmp(const char *cs, const char *ct, size_t count)
"3:\tsbbl %%eax,%%eax\n\t" "3:\tsbbl %%eax,%%eax\n\t"
"orb $1,%%al\n" "orb $1,%%al\n"
"4:" "4:"
:"=a" (res), "=&S" (d0), "=&D" (d1), "=&c" (d2) : "=a" (res), "=&S" (d0), "=&D" (d1), "=&c" (d2)
:"1" (cs), "2" (ct), "3" (count) : "1" (cs), "2" (ct), "3" (count)
:"memory"); : "memory");
return res; return res;
} }
EXPORT_SYMBOL(strncmp); EXPORT_SYMBOL(strncmp);
...@@ -152,9 +152,9 @@ char *strchr(const char *s, int c) ...@@ -152,9 +152,9 @@ char *strchr(const char *s, int c)
"movl $1,%1\n" "movl $1,%1\n"
"2:\tmovl %1,%0\n\t" "2:\tmovl %1,%0\n\t"
"decl %0" "decl %0"
:"=a" (res), "=&S" (d0) : "=a" (res), "=&S" (d0)
:"1" (s), "0" (c) : "1" (s), "0" (c)
:"memory"); : "memory");
return res; return res;
} }
EXPORT_SYMBOL(strchr); EXPORT_SYMBOL(strchr);
...@@ -169,9 +169,9 @@ size_t strlen(const char *s) ...@@ -169,9 +169,9 @@ size_t strlen(const char *s)
"scasb\n\t" "scasb\n\t"
"notl %0\n\t" "notl %0\n\t"
"decl %0" "decl %0"
:"=c" (res), "=&D" (d0) : "=c" (res), "=&D" (d0)
:"1" (s), "a" (0), "0" (0xffffffffu) : "1" (s), "a" (0), "0" (0xffffffffu)
:"memory"); : "memory");
return res; return res;
} }
EXPORT_SYMBOL(strlen); EXPORT_SYMBOL(strlen);
...@@ -189,9 +189,9 @@ void *memchr(const void *cs, int c, size_t count) ...@@ -189,9 +189,9 @@ void *memchr(const void *cs, int c, size_t count)
"je 1f\n\t" "je 1f\n\t"
"movl $1,%0\n" "movl $1,%0\n"
"1:\tdecl %0" "1:\tdecl %0"
:"=D" (res), "=&c" (d0) : "=D" (res), "=&c" (d0)
:"a" (c), "0" (cs), "1" (count) : "a" (c), "0" (cs), "1" (count)
:"memory"); : "memory");
return res; return res;
} }
EXPORT_SYMBOL(memchr); EXPORT_SYMBOL(memchr);
...@@ -228,9 +228,9 @@ size_t strnlen(const char *s, size_t count) ...@@ -228,9 +228,9 @@ size_t strnlen(const char *s, size_t count)
"cmpl $-1,%1\n\t" "cmpl $-1,%1\n\t"
"jne 1b\n" "jne 1b\n"
"3:\tsubl %2,%0" "3:\tsubl %2,%0"
:"=a" (res), "=&d" (d0) : "=a" (res), "=&d" (d0)
:"c" (s), "1" (count) : "c" (s), "1" (count)
:"memory"); : "memory");
return res; return res;
} }
EXPORT_SYMBOL(strnlen); EXPORT_SYMBOL(strnlen);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment