diff options
author | obrien <obrien@FreeBSD.org> | 1999-11-15 23:16:06 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 1999-11-15 23:16:06 +0000 |
commit | 2577cb31913102f2c35750ea27a161977c1ce6f7 (patch) | |
tree | c928f546ea7f465a181aaed6b604896f2f309433 | |
parent | e2ed2a4ac337dcb4591bc28e82b47dfcac0d2568 (diff) | |
download | FreeBSD-src-2577cb31913102f2c35750ea27a161977c1ce6f7.zip FreeBSD-src-2577cb31913102f2c35750ea27a161977c1ce6f7.tar.gz |
Fix __asm__ clobber list abuse.
Submitted by: bde
-rw-r--r-- | sys/gnu/ext2fs/i386-bitops.h | 8 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/i386-bitops.h | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/sys/gnu/ext2fs/i386-bitops.h b/sys/gnu/ext2fs/i386-bitops.h index 4e3d151..595e870 100644 --- a/sys/gnu/ext2fs/i386-bitops.h +++ b/sys/gnu/ext2fs/i386-bitops.h @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /* * this is mixture of i386/bitops.h and asm/string.h * taken from the Linux source tree @@ -75,6 +76,7 @@ static __inline__ int test_bit(int nr, void * addr) static __inline__ int find_first_zero_bit(void * addr, unsigned size) { int res; + int _count = (size + 31) >> 5; if (!size) return 0; @@ -90,9 +92,9 @@ static __inline__ int find_first_zero_bit(void * addr, unsigned size) 1: subl %%ebx,%%edi \n\ shll $3,%%edi \n\ addl %%edi,%%edx" - :"=d" (res) - :"c" ((size + 31) >> 5), "D" (addr), "b" (addr) - :"ax", "cx", "di"); + : "=c" (_count), "=D" (addr), "=d" (res) + : "0" (_count), "1" (addr), "b" (addr) + : "ax"); return res; } diff --git a/sys/gnu/fs/ext2fs/i386-bitops.h b/sys/gnu/fs/ext2fs/i386-bitops.h index 4e3d151..595e870 100644 --- a/sys/gnu/fs/ext2fs/i386-bitops.h +++ b/sys/gnu/fs/ext2fs/i386-bitops.h @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /* * this is mixture of i386/bitops.h and asm/string.h * taken from the Linux source tree @@ -75,6 +76,7 @@ static __inline__ int test_bit(int nr, void * addr) static __inline__ int find_first_zero_bit(void * addr, unsigned size) { int res; + int _count = (size + 31) >> 5; if (!size) return 0; @@ -90,9 +92,9 @@ static __inline__ int find_first_zero_bit(void * addr, unsigned size) 1: subl %%ebx,%%edi \n\ shll $3,%%edi \n\ addl %%edi,%%edx" - :"=d" (res) - :"c" ((size + 31) >> 5), "D" (addr), "b" (addr) - :"ax", "cx", "di"); + : "=c" (_count), "=D" (addr), "=d" (res) + : "0" (_count), "1" (addr), "b" (addr) + : "ax"); return res; } |