[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH]: string.h/inline under GCC 3.x
From: |
Denis Zaitsev |
Subject: |
[PATCH]: string.h/inline under GCC 3.x |
Date: |
Thu, 4 Jul 2002 06:00:26 +0600 |
Below it's a little patch that fixes inline strstr implementation for
i386. The problem is that the first asm operand, tied with %eax, is
marked as just an output operand, while it is earlyclobber too, and
must be marked as such. Else we have the problem with GCC 3.x.
Interesting that GCC 2.95.x doesn't exposure any problem. I'm not
sure, but it's such a feeling, that 2.95 always assumes %eax to be an
earlyclobber...
The patch's subject - the string.h header - resides in
/usr/include/bits, if GLIBC is compiled and installed for i[456]86
host, so the patch can be applied just for that file in a "live
system".
Please, apply it.
--- sysdeps/i386/i486/bits/string.h.orig Sat Feb 2 21:53:21 2002
+++ sysdeps/i386/i486/bits/string.h Sun May 26 07:37:59 2002
@@ -1804,7 +1804,7 @@ __strstr_cg (__const char *__haystack, _
"jne 1b\n\t"
"xorl %%eax,%%eax\n"
"2:"
- : "=a" (__res), "=&S" (__d0), "=&D" (__d1), "=&c" (__d2)
+ : "=&a" (__res), "=&S" (__d0), "=&D" (__d1), "=&c" (__d2)
: "g" (__needle_len), "1" (__haystack), "d" (__needle)
: "cc");
return __res;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH]: string.h/inline under GCC 3.x,
Denis Zaitsev <=