[Bug rtl-optimization/85745] variable with asm register assignment allocated in wrong reg
bernd.edlinger at hotmail dot de
gcc-bugzilla@gcc.gnu.org
Mon May 14 08:43:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85745
--- Comment #3 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
just in case someone runs into the same issue, this would
be the linux patch that Jakub suggested:
commit 20dfb4d2eb648bd947adbb729d963f78df75ffee
Author: Bernd Edlinger <bernd.edlinger@hotmail.de>
Date: Fri May 11 18:51:03 2018 +0200
Fix compilation with gcc-8
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h
index 74b17d0..dc64fa2 100644
--- a/arch/arm/include/asm/uaccess.h
+++ b/arch/arm/include/asm/uaccess.h
@@ -220,7 +220,7 @@ extern int __put_user_8(void *, unsigned long long);
({ \
unsigned long __limit = current_thread_info()->addr_limit - 1;
\
const typeof(*(p)) __user *__tmp_p = (p); \
- register const typeof(*(p)) __r2 asm("r2") = (x); \
+ register typeof(*(p)) __r2 asm("r2") = (x); \
register const typeof(*(p)) __user *__p asm("r0") = __tmp_p; \
register unsigned long __l asm("r1") = __limit; \
register int __e asm("r0"); \
More information about the Gcc-bugs
mailing list