]> git.baikalelectronics.ru Git - kernel.git/commitdiff
s390/bitops: use register pair instead of register asm
authorHeiko Carstens <hca@linux.ibm.com>
Wed, 9 Jun 2021 20:59:13 +0000 (22:59 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Fri, 18 Jun 2021 14:41:21 +0000 (16:41 +0200)
Get rid of register asm statement and use a register pair.
This allows the compiler to allocate registers on its own.

Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/include/asm/bitops.h

index 68da67d2c4c97ee3addfb539afdca9f94ba50608..fd149480b6e2b1e6490f5056d280f3d6d4216dff 100644 (file)
@@ -299,13 +299,13 @@ static inline unsigned char __flogr(unsigned long word)
                }
                return bit;
        } else {
-               register unsigned long bit asm("4") = word;
-               register unsigned long out asm("5");
+               union register_pair rp;
 
+               rp.even = word;
                asm volatile(
-                       "       flogr   %[bit],%[bit]\n"
-                       : [bit] "+d" (bit), [out] "=d" (out) : : "cc");
-               return bit;
+                       "       flogr   %[rp],%[rp]\n"
+                       : [rp] "+d" (rp.pair) : : "cc");
+               return rp.even;
        }
 }