]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
MIPS: Override assembler target architecture for octeon.
authorDavid Daney <ddaney@caviumnetworks.com>
Thu, 11 Dec 2008 23:33:25 +0000 (15:33 -0800)
committerRalf Baechle <ralf@linux-mips.org>
Sun, 11 Jan 2009 09:57:21 +0000 (09:57 +0000)
Gas from binutils 2.19 fails to compile some cop1 instructions with
-march=octeon.  Since the cop1 instructions are present in mips1, use
that arch instead.  This will be fixed in binutils 2.20.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/mipsregs.h
arch/mips/kernel/genex.S

index 207d098f707fd25f153b4d2f957d5b93468f09d8..0417516503f634484bea51436d9befa8059b4a83 100644 (file)
@@ -1028,6 +1028,8 @@ do {                                                                      \
        __asm__ __volatile__(                                   \
        ".set\tpush\n\t"                                        \
        ".set\treorder\n\t"                                     \
+       /* gas fails to assemble cfc1 for some archs (octeon).*/ \
+       ".set\tmips1\n\t"                                       \
         "cfc1\t%0,"STR(source)"\n\t"                            \
        ".set\tpop"                                             \
         : "=r" (__res));                                        \
index 757d48f0d80f2c732636a074f280a6eba443e143..fb6f73148df2f7c7459648ed110fcdde62145f2a 100644 (file)
@@ -385,10 +385,14 @@ NESTED(nmi_handler, PT_SIZE, sp)
        .endm
 
        .macro  __build_clear_fpe
+       .set    push
+       /* gas fails to assemble cfc1 for some archs (octeon).*/ \
+       .set    mips1
        cfc1    a1, fcr31
        li      a2, ~(0x3f << 12)
        and     a2, a1
        ctc1    a2, fcr31
+       .set    pop
        TRACE_IRQS_ON
        STI
        .endm