]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/x86/boot/boot.h
Merge branch 'for-4.8/core' of git://git.kernel.dk/linux-block
[karo-tx-linux.git] / arch / x86 / boot / boot.h
index a5ce666a2423c0805028383cfa88f7444ce291d0..e5612f3e3b57ca7611f1e348c7f317f1416dd54a 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/types.h>
 #include <linux/edd.h>
 #include <asm/setup.h>
+#include <asm/asm.h>
 #include "bitops.h"
 #include "ctype.h"
 #include "cpuflags.h"
@@ -176,18 +177,18 @@ static inline void wrgs32(u32 v, addr_t addr)
 }
 
 /* Note: these only return true/false, not a signed return value! */
-static inline int memcmp_fs(const void *s1, addr_t s2, size_t len)
+static inline bool memcmp_fs(const void *s1, addr_t s2, size_t len)
 {
-       u8 diff;
-       asm volatile("fs; repe; cmpsb; setnz %0"
-                    : "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len));
+       bool diff;
+       asm volatile("fs; repe; cmpsb" CC_SET(nz)
+                    : CC_OUT(nz) (diff), "+D" (s1), "+S" (s2), "+c" (len));
        return diff;
 }
-static inline int memcmp_gs(const void *s1, addr_t s2, size_t len)
+static inline bool memcmp_gs(const void *s1, addr_t s2, size_t len)
 {
-       u8 diff;
-       asm volatile("gs; repe; cmpsb; setnz %0"
-                    : "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len));
+       bool diff;
+       asm volatile("gs; repe; cmpsb" CC_SET(nz)
+                    : CC_OUT(nz) (diff), "+D" (s1), "+S" (s2), "+c" (len));
        return diff;
 }