Work around clang problems with "=rm" asm constraint.
clang seems to always chose the memory output, while it is almost
always the worst choice.
Add ASM_OUTPUT_RM so that we can replace "=rm" constraint
where it matters for clang, while not penalizing gcc.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Suggested-by: Uros Bizjak <ubizjak@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
*/
#define ASM_INPUT_G "ir"
#define ASM_INPUT_RM "r"
+#define ASM_OUTPUT_RM "=r"
/*
* Declare compiler support for __typeof_unqual__() operator.
/*
* Clang has trouble with constraints with multiple
- * alternative behaviors (mainly "g" and "rm").
+ * alternative behaviors ("g" , "rm" and "=rm").
*/
#ifndef ASM_INPUT_G
#define ASM_INPUT_G "g"
#define ASM_INPUT_RM "rm"
+ #define ASM_OUTPUT_RM "=rm"
#endif
#ifdef CONFIG_CC_HAS_ASM_INLINE