]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Revert "MIPS: LD/SD o32 macro GAS fix update"
authorRalf Baechle <ralf@linux-mips.org>
Thu, 28 Jul 2011 15:20:23 +0000 (16:20 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 9 Aug 2011 08:16:23 +0000 (09:16 +0100)
This reverts commit 97475f8b42e83be2966aa2d70ab9c98477701c53 (lmo) /
82b89152f00f7ad17844d5614d5011e8d7944ac9 (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.

arch/mips/include/asm/io.h
arch/mips/pmc-sierra/yosemite/py-console.c

index b04e4de5dd2e0a2cf39074cd82b8d67f3eb81cce..a58f22998a86507729e3d72d379ef6e23ddad019 100644 (file)
@@ -329,14 +329,10 @@ static inline void pfx##write##bwlq(type val,                             \
                        "dsrl32 %L0, %L0, 0"                    "\n\t"  \
                        "dsll32 %M0, %M0, 0"                    "\n\t"  \
                        "or     %L0, %L0, %M0"                  "\n\t"  \
-                       ".set   push"                           "\n\t"  \
-                       ".set   noreorder"                      "\n\t"  \
-                       ".set   nomacro"                        "\n\t"  \
                        "sd     %L0, %2"                        "\n\t"  \
-                       ".set   pop"                            "\n\t"  \
                        ".set   mips0"                          "\n"    \
                        : "=r" (__tmp)                                  \
-                       : "0" (__val), "R" (*__mem));                   \
+                       : "0" (__val), "m" (*__mem));                   \
                if (irq)                                                \
                        local_irq_restore(__flags);                     \
        } else                                                          \
@@ -359,16 +355,12 @@ static inline type pfx##read##bwlq(const volatile void __iomem *mem)      \
                        local_irq_save(__flags);                        \
                __asm__ __volatile__(                                   \
                        ".set   mips3"          "\t\t# __readq" "\n\t"  \
-                       ".set   push"                           "\n\t"  \
-                       ".set   noreorder"                      "\n\t"  \
-                       ".set   nomacro"                        "\n\t"  \
                        "ld     %L0, %1"                        "\n\t"  \
-                       ".set   pop"                            "\n\t"  \
                        "dsra32 %M0, %L0, 0"                    "\n\t"  \
                        "sll    %L0, %L0, 0"                    "\n\t"  \
                        ".set   mips0"                          "\n"    \
                        : "=r" (__val)                                  \
-                       : "R" (*__mem));                                \
+                       : "m" (*__mem));                                \
                if (irq)                                                \
                        local_irq_restore(__flags);                     \
        } else {                                                        \
index 434d7b1a8c6a7abf4c492a14b975111a21b1a4ab..b7f1d9c4a8a3c7d588b270d6bd6e1bad0590f6b2 100644 (file)
@@ -65,15 +65,11 @@ static unsigned char readb_outer_space(unsigned long long phys)
 
        __asm__ __volatile__ (
        "       .set    mips3           \n"
-       "       .set    push            \n"
-       "       .set    noreorder       \n"
-       "       .set    nomacro         \n"
        "       ld      %0, %1          \n"
-       "       .set    pop             \n"
        "       lbu     %0, (%0)        \n"
        "       .set    mips0           \n"
        : "=r" (res)
-       : "R" (vaddr));
+       : "m" (vaddr));
 
        write_c0_status(sr);
        ssnop_4();
@@ -93,15 +89,11 @@ static void writeb_outer_space(unsigned long long phys, unsigned char c)
 
        __asm__ __volatile__ (
        "       .set    mips3           \n"
-       "       .set    push            \n"
-       "       .set    noreorder       \n"
-       "       .set    nomacro         \n"
        "       ld      %0, %1          \n"
-       "       .set    pop             \n"
        "       sb      %2, (%0)        \n"
        "       .set    mips0           \n"
        : "=&r" (tmp)
-       : "R" (vaddr), "r" (c));
+       : "m" (vaddr), "r" (c));
 
        write_c0_status(sr);
        ssnop_4();