diff --git a/src/arch/armv8/aarch32/inc/arch/subarch/sysregs.h b/src/arch/armv8/aarch32/inc/arch/subarch/sysregs.h index 93cb8988..44c8eeff 100644 --- a/src/arch/armv8/aarch32/inc/arch/subarch/sysregs.h +++ b/src/arch/armv8/aarch32/inc/arch/subarch/sysregs.h @@ -40,7 +40,7 @@ { \ unsigned long long _temp, _tempH; \ __asm__ volatile("mrrc p15, " #op1 ", %0, %1, " #crm "\n\r" : "=r"(_temp), "=r"(_tempH)); \ - return ((_tempH << 32) | _temp); \ + return ((_tempH << 32) | ((unsigned long)_temp)); \ } \ static inline void sysreg_##reg##_write(unsigned long long val) \ { \