aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDavid Daney <ddaney@caviumnetworks.com>2008-12-11 18:33:25 -0500
committerRalf Baechle <ralf@linux-mips.org>2009-01-11 04:57:21 -0500
commit25c3000300163e2ebf68d94425088de35ead3d76 (patch)
tree096d96e7e5fbe633bcbf1e19da53bcfea78461e3 /arch
parented918c2daf9ef4c3b52f75736c3a652e5160c8ad (diff)
MIPS: Override assembler target architecture for octeon.
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/include/asm/mipsregs.h2
-rw-r--r--arch/mips/kernel/genex.S4
2 files changed, 6 insertions, 0 deletions
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h
index 207d098f707f..0417516503f6 100644
--- a/arch/mips/include/asm/mipsregs.h
+++ b/arch/mips/include/asm/mipsregs.h
@@ -1028,6 +1028,8 @@ do { \
1028 __asm__ __volatile__( \ 1028 __asm__ __volatile__( \
1029 ".set\tpush\n\t" \ 1029 ".set\tpush\n\t" \
1030 ".set\treorder\n\t" \ 1030 ".set\treorder\n\t" \
1031 /* gas fails to assemble cfc1 for some archs (octeon).*/ \
1032 ".set\tmips1\n\t" \
1031 "cfc1\t%0,"STR(source)"\n\t" \ 1033 "cfc1\t%0,"STR(source)"\n\t" \
1032 ".set\tpop" \ 1034 ".set\tpop" \
1033 : "=r" (__res)); \ 1035 : "=r" (__res)); \
diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S
index 757d48f0d80f..fb6f73148df2 100644
--- a/arch/mips/kernel/genex.S
+++ b/arch/mips/kernel/genex.S
@@ -385,10 +385,14 @@ NESTED(nmi_handler, PT_SIZE, sp)
385 .endm 385 .endm
386 386
387 .macro __build_clear_fpe 387 .macro __build_clear_fpe
388 .set push
389 /* gas fails to assemble cfc1 for some archs (octeon).*/ \
390 .set mips1
388 cfc1 a1, fcr31 391 cfc1 a1, fcr31
389 li a2, ~(0x3f << 12) 392 li a2, ~(0x3f << 12)
390 and a2, a1 393 and a2, a1
391 ctc1 a2, fcr31 394 ctc1 a2, fcr31
395 .set pop
392 TRACE_IRQS_ON 396 TRACE_IRQS_ON
393 STI 397 STI
394 .endm 398 .endm