Re: [05/07] Add "memory" clobbers to the x86 inline asm of strncmp and friends

Jean Delvare
2005-06-28T22:03:59Z

Hi Chris,

> @@ -138,8 +139,9 @@ __asm__ __volatile__(
> "3:\tsbbl %%eax,%%eax\n\t"
> "orb $1,%%al\n"
> "4:"
> - :"=a" (__res), "=&S" (d0), "=&D" (d1), "=&c" (d2)
> - :"1" (cs),"2" (ct),"3" (count));
> + :"=a" (__res), "=&S" (d0), "=&D" (d1), "=&c" (d2)
> + :"1" (cs),"2" (ct),"3" (count)
> + :"memory");
> return __res;
> }

Could be made shorter. As far as I remember, indentation fixes are not
-stable material.

> @@ -369,7 +379,7 @@ __asm__ __volatile__(
> "je 2f\n\t"
> "stosb\n"
> "2:"
> - : "=&c" (d0), "=&D" (d1)
> + :"=&c" (d0), "=&D" (d1)
> :"a" (c), "q" (count), "0" (count/4), "1" ((long) s)
> :"memory");
> return (s);

Doesn't belong there, unless -stable rules have changed.

Thanks,
--
Jean Delvare