MIPS: Fix sign-extension bug in 32-bit kernel on 32-bit hardware.
Probably nobody does arithmetic on cp0 register values so this has never bitten. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
Родитель
5c5dd1d291
Коммит
0b54352600
|
@ -728,8 +728,8 @@ do { \
|
||||||
".set\tmips64\n\t" \
|
".set\tmips64\n\t" \
|
||||||
"dmfc0\t%M0, " #source "\n\t" \
|
"dmfc0\t%M0, " #source "\n\t" \
|
||||||
"dsll\t%L0, %M0, 32\n\t" \
|
"dsll\t%L0, %M0, 32\n\t" \
|
||||||
"dsrl\t%M0, %M0, 32\n\t" \
|
"dsra\t%M0, %M0, 32\n\t" \
|
||||||
"dsrl\t%L0, %L0, 32\n\t" \
|
"dsra\t%L0, %L0, 32\n\t" \
|
||||||
".set\tmips0" \
|
".set\tmips0" \
|
||||||
: "=r" (__val)); \
|
: "=r" (__val)); \
|
||||||
else \
|
else \
|
||||||
|
@ -737,8 +737,8 @@ do { \
|
||||||
".set\tmips64\n\t" \
|
".set\tmips64\n\t" \
|
||||||
"dmfc0\t%M0, " #source ", " #sel "\n\t" \
|
"dmfc0\t%M0, " #source ", " #sel "\n\t" \
|
||||||
"dsll\t%L0, %M0, 32\n\t" \
|
"dsll\t%L0, %M0, 32\n\t" \
|
||||||
"dsrl\t%M0, %M0, 32\n\t" \
|
"dsra\t%M0, %M0, 32\n\t" \
|
||||||
"dsrl\t%L0, %L0, 32\n\t" \
|
"dsra\t%L0, %L0, 32\n\t" \
|
||||||
".set\tmips0" \
|
".set\tmips0" \
|
||||||
: "=r" (__val)); \
|
: "=r" (__val)); \
|
||||||
local_irq_restore(__flags); \
|
local_irq_restore(__flags); \
|
||||||
|
|
Загрузка…
Ссылка в новой задаче