Remove redundant test.
[libfirm] / include / libfirm / adt / bitset_ia32.h
index 56b07a1..529057d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
  *
  * This file is part of libFirm.
  *
@@ -51,9 +51,9 @@
 static INLINE int _bitset_ia32_inside_is_set(bitset_unit_t *unit, unsigned bit)
 {
        int res;
-       __asm__("btl   %2, %1\n\t"
-                       "mov   $0, %0\n\t"
-                       "adc   $0, %0"
+       __asm__("bt    %2, %1\n\t"
+                       "rcl   $1, %0\n\t"
+                       "and   $1, %0"
                        : "=r" (res)
                        : "m" (*unit), "Ir" (bit)
                        : "cc");
@@ -63,7 +63,7 @@ static INLINE int _bitset_ia32_inside_is_set(bitset_unit_t *unit, unsigned bit)
 static INLINE unsigned _bitset_ia32_inside_nlz(bitset_unit_t *unit)
 {
        unsigned res;
-       __asm__("bsrl   %1, %0\n\t"
+       __asm__("bsr    %1, %0\n\t"
                        "cmovz  %2, %0\n\t"
                        "neg    %0\n\t"
                        "add   $31, %0"