diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2018-06-29 16:28:44 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-08-02 14:30:42 +0200 |
commit | 216a37202f10b7d78f2f98e26a6681f367165f05 (patch) | |
tree | 11e0d4eb2374344178b7f7dcaccbe03d169fb5bf /arch/x86/boot/string.c | |
parent | 5db1b1e1ee34871b1965b3f890e3ccbdb185fa52 (diff) | |
download | lwn-216a37202f10b7d78f2f98e26a6681f367165f05.tar.gz lwn-216a37202f10b7d78f2f98e26a6681f367165f05.zip |
x86/boot: Use CC_SET()/CC_OUT() instead of open coding it
Remove open-coded uses of set instructions with CC_SET()/CC_OUT().
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20180629142844.15200-1-ubizjak@gmail.com
Diffstat (limited to 'arch/x86/boot/string.c')
-rw-r--r-- | arch/x86/boot/string.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/boot/string.c b/arch/x86/boot/string.c index 16f49123d747..c4428a176973 100644 --- a/arch/x86/boot/string.c +++ b/arch/x86/boot/string.c @@ -13,6 +13,7 @@ */ #include <linux/types.h> +#include <asm/asm.h> #include "ctype.h" #include "string.h" @@ -28,8 +29,8 @@ int memcmp(const void *s1, const void *s2, size_t len) { bool diff; - asm("repe; cmpsb; setnz %0" - : "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len)); + asm("repe; cmpsb" CC_SET(nz) + : CC_OUT(nz) (diff), "+D" (s1), "+S" (s2), "+c" (len)); return diff; } |