Whamcloud - gitweb
Fix the x86 asm constraints for ext2fs_set/clear_bit.
authorTheodore Ts'o <tytso@mit.edu>
Wed, 29 Mar 2006 19:23:00 +0000 (14:23 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 29 Mar 2006 19:23:00 +0000 (14:23 -0500)
The assembly function reads/writes the data files, so make sure we
tell gcc that.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/ext2fs/ChangeLog
lib/ext2fs/bitops.h

index ac3cd69..4a12f78 100644 (file)
@@ -1,3 +1,9 @@
+2006-03-29  Theodore Ts'o  <tytso@mit.edu>
+
+       * bitops.h (ext2fs_set_bit, ext2fs_clear_bit): Fix the constraints
+               so that GCC knows that the ext2fs_set/clear_bit reads and
+               writes the data.
+
 2006-03-25  Theodore Ts'o  <tytso@mit.edu>
 
        * Makefile.in: Check the bitfield operations much more carefully,
index caaec5f..5d01838 100644 (file)
@@ -181,7 +181,7 @@ _INLINE_ int ext2fs_set_bit(unsigned int nr, void * addr)
 
        addr = (void *) (((unsigned char *) addr) + (nr >> 3));
        __asm__ __volatile__("btsl %2,%1\n\tsbbl %0,%0"
-               :"=r" (oldbit),"=m" (EXT2FS_ADDR)
+               :"=r" (oldbit),"+m" (EXT2FS_ADDR)
                :"r" (nr & 7));
        return oldbit;
 }
@@ -192,7 +192,7 @@ _INLINE_ int ext2fs_clear_bit(unsigned int nr, void * addr)
 
        addr = (void *) (((unsigned char *) addr) + (nr >> 3));
        __asm__ __volatile__("btrl %2,%1\n\tsbbl %0,%0"
-               :"=r" (oldbit),"=m" (EXT2FS_ADDR)
+               :"=r" (oldbit),"+m" (EXT2FS_ADDR)
                :"r" (nr & 7));
        return oldbit;
 }