diff options
Diffstat (limited to 'include/linux/compiler-gcc4.h')
-rw-r--r-- | include/linux/compiler-gcc4.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index 842de225055..2507fd2a1eb 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h @@ -65,6 +65,17 @@ #define __visible __attribute__((externally_visible)) #endif +/* + * GCC 'asm goto' miscompiles certain code sequences: + * + * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 + * + * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. + * Fixed in GCC 4.8.2 and later versions. + * + * (asm goto is automatically volatile - the naming reflects this.) + */ +#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) #ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP #if GCC_VERSION >= 40400 |