Skip to content

Commit b77bb37

Browse files
committed
Revert "MIPS: LD/SD o32 macro GAS fix update"
This reverts commit 97475f8b42e83be2966aa2d70ab9c98477701c53 (lmo) / 82b8915 (kernel.org) [MIPS: LD/SD o32 macro GAS fix update]. Turns out this patch is producing many build errors with gcc 4.2. Based on further testing with a test case extracted from the build errors found further build errors and suboptimal generation even in violation of the "R" constraint. To make matters worse, the binutils changes also don't work quite as intended so revert this patch for now.
1 parent dd5d138 commit b77bb37

2 files changed

Lines changed: 4 additions & 20 deletions

File tree

‎arch/mips/include/asm/io.h‎

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -329,14 +329,10 @@ static inline void pfx##write##bwlq(type val, \
329329
"dsrl32 %L0, %L0, 0" "\n\t" \
330330
"dsll32 %M0, %M0, 0" "\n\t" \
331331
"or %L0, %L0, %M0" "\n\t" \
332-
".set push" "\n\t" \
333-
".set noreorder" "\n\t" \
334-
".set nomacro" "\n\t" \
335332
"sd %L0, %2" "\n\t" \
336-
".set pop" "\n\t" \
337333
".set mips0" "\n" \
338334
: "=r" (__tmp) \
339-
: "0" (__val), "R" (*__mem)); \
335+
: "0" (__val), "m" (*__mem)); \
340336
if (irq) \
341337
local_irq_restore(__flags); \
342338
} else \
@@ -359,16 +355,12 @@ static inline type pfx##read##bwlq(const volatile void __iomem *mem) \
359355
local_irq_save(__flags); \
360356
__asm__ __volatile__( \
361357
".set mips3" "\t\t# __readq" "\n\t" \
362-
".set push" "\n\t" \
363-
".set noreorder" "\n\t" \
364-
".set nomacro" "\n\t" \
365358
"ld %L0, %1" "\n\t" \
366-
".set pop" "\n\t" \
367359
"dsra32 %M0, %L0, 0" "\n\t" \
368360
"sll %L0, %L0, 0" "\n\t" \
369361
".set mips0" "\n" \
370362
: "=r" (__val) \
371-
: "R" (*__mem)); \
363+
: "m" (*__mem)); \
372364
if (irq) \
373365
local_irq_restore(__flags); \
374366
} else { \

‎arch/mips/pmc-sierra/yosemite/py-console.c‎

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,11 @@ static unsigned char readb_outer_space(unsigned long long phys)
6565

6666
__asm__ __volatile__ (
6767
" .set mips3 \n"
68-
" .set push \n"
69-
" .set noreorder \n"
70-
" .set nomacro \n"
7168
" ld %0, %1 \n"
72-
" .set pop \n"
7369
" lbu %0, (%0) \n"
7470
" .set mips0 \n"
7571
: "=r" (res)
76-
: "R" (vaddr));
72+
: "m" (vaddr));
7773

7874
write_c0_status(sr);
7975
ssnop_4();
@@ -93,15 +89,11 @@ static void writeb_outer_space(unsigned long long phys, unsigned char c)
9389

9490
__asm__ __volatile__ (
9591
" .set mips3 \n"
96-
" .set push \n"
97-
" .set noreorder \n"
98-
" .set nomacro \n"
9992
" ld %0, %1 \n"
100-
" .set pop \n"
10193
" sb %2, (%0) \n"
10294
" .set mips0 \n"
10395
: "=&r" (tmp)
104-
: "R" (vaddr), "r" (c));
96+
: "m" (vaddr), "r" (c));
10597

10698
write_c0_status(sr);
10799
ssnop_4();

0 commit comments

Comments
 (0)