From: Florent Kermarrec Date: Sun, 10 Apr 2016 15:21:54 +0000 (+0200) Subject: software/include/base: fix system.h for or1k X-Git-Tag: 24jan2021_ls180~1976^2~1 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=40eb779e67f77921b0f36314833258659b7ac384;p=litex.git software/include/base: fix system.h for or1k --- diff --git a/litex/soc/software/include/base/system.h b/litex/soc/software/include/base/system.h index 014dbf47..2a0d0c29 100644 --- a/litex/soc/software/include/base/system.h +++ b/litex/soc/software/include/base/system.h @@ -15,14 +15,14 @@ static inline unsigned long mfspr(unsigned long add) { unsigned long ret; - __asm__ __volatile__ ("l.mfspr %0,r0,%1" : "=r" (ret) : "K" (add)); + __asm__ __volatile__ ("l.mfspr %0,%1,0" : "=r" (ret) : "r" (add)); return ret; } static inline void mtspr(unsigned long add, unsigned long val) { - __asm__ __volatile__ ("l.mtspr r0,%1,%0" : : "K" (add), "r" (val)); + __asm__ __volatile__ ("l.mtspr %0,%1,0" : : "r" (add), "r" (val)); } #endif