Skip to content

Commit 0caf91f

Browse files
committed
s390/string: Convert to use flag output macros
Use flag output macros in inline asm to allow for better code generation if the compiler has support for the flag output constraint. Reviewed-by: Juergen Christ <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
1 parent a6122f6 commit 0caf91f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

arch/s390/lib/string.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <linux/types.h>
1616
#include <linux/string.h>
1717
#include <linux/export.h>
18+
#include <asm/asm.h>
1819

1920
/*
2021
* Helper functions to find the end of a string
@@ -238,12 +239,11 @@ static inline int clcle(const char *s1, unsigned long l1,
238239
asm volatile(
239240
"0: clcle %[r1],%[r3],0\n"
240241
" jo 0b\n"
241-
" ipm %[cc]\n"
242-
" srl %[cc],28\n"
243-
: [cc] "=&d" (cc), [r1] "+&d" (r1.pair), [r3] "+&d" (r3.pair)
242+
CC_IPM(cc)
243+
: CC_OUT(cc, cc), [r1] "+d" (r1.pair), [r3] "+d" (r3.pair)
244244
:
245-
: "cc", "memory");
246-
return cc;
245+
: CC_CLOBBER_LIST("memory"));
246+
return CC_TRANSFORM(cc);
247247
}
248248

249249
/**

0 commit comments

Comments
 (0)