| To: | linux-mips@linux-mips.org |
|---|---|
| Subject: | [PATCH 07/21] MIPS: Override assembler target architecture for octeon. |
| From: | David Daney <ddaney@caviumnetworks.com> |
| Date: | Wed, 3 Dec 2008 15:44:17 -0800 |
| Cc: | David Daney <ddaney@caviumnetworks.com> |
| In-reply-to: | <493718EA.40703@caviumnetworks.com> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <493718EA.40703@caviumnetworks.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
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>
---
arch/mips/include/asm/mipsregs.h | 2 ++
arch/mips/kernel/genex.S | 4 ++++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h
index 207d098..0417516 100644
--- a/arch/mips/include/asm/mipsregs.h
+++ b/arch/mips/include/asm/mipsregs.h
@@ -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)); \
diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S
index 757d48f..fb6f731 100644
--- a/arch/mips/kernel/genex.S
+++ b/arch/mips/kernel/genex.S
@@ -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
--
1.5.6.5
|
| Previous by Date: | [PATCH 09/21] MIPS: Hook Cavium OCTEON cache init into cache.c, David Daney |
|---|---|
| Next by Date: | [PATCH 08/21] MIPS: Add Cavium OCTEON processor constants and CPU probe., David Daney |
| Previous by Thread: | [PATCH 09/21] MIPS: Hook Cavium OCTEON cache init into cache.c, David Daney |
| Next by Thread: | [PATCH 08/21] MIPS: Add Cavium OCTEON processor constants and CPU probe., David Daney |
| Indexes: | [Date] [Thread] [Top] [All Lists] |