Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

David Daney and committed by
Ralf Baechle
25c30003 ed918c2d

+6
+2
arch/mips/include/asm/mipsregs.h
··· 1028 1028 __asm__ __volatile__( \ 1029 1029 ".set\tpush\n\t" \ 1030 1030 ".set\treorder\n\t" \ 1031 + /* gas fails to assemble cfc1 for some archs (octeon).*/ \ 1032 + ".set\tmips1\n\t" \ 1031 1033 "cfc1\t%0,"STR(source)"\n\t" \ 1032 1034 ".set\tpop" \ 1033 1035 : "=r" (__res)); \
+4
arch/mips/kernel/genex.S
··· 385 385 .endm 386 386 387 387 .macro __build_clear_fpe 388 + .set push 389 + /* gas fails to assemble cfc1 for some archs (octeon).*/ \ 390 + .set mips1 388 391 cfc1 a1, fcr31 389 392 li a2, ~(0x3f << 12) 390 393 and a2, a1 391 394 ctc1 a2, fcr31 395 + .set pop 392 396 TRACE_IRQS_ON 393 397 STI 394 398 .endm