diff options
author | Steven J. Hill <sjhill@mips.com> | 2013-01-03 14:01:52 -0500 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2013-02-16 18:15:23 -0500 |
commit | 32a7ede673cd0be580f24d855099a8a5f195e80c (patch) | |
tree | 58529df42257c146094b0e3843be2a98ed18922b /arch/mips/kernel/Makefile | |
parent | f8fa4811dbb264aef13f982e963389fd828b1ac0 (diff) |
MIPS: dsp: Add assembler support for DSP ASEs.
Newer toolchains support the DSP and DSP Rev2 instructions. This patch
performs a check for that support and adds compiler and assembler
flags for only the files that need use those instructions.
Signed-off-by: Steven J. Hill <sjhill@mips.com>
Acked-by: Florian Fainelli <florian@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/4752/
Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'arch/mips/kernel/Makefile')
-rw-r--r-- | arch/mips/kernel/Makefile | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile index 007c33d73715..6c17e1f3d0ec 100644 --- a/arch/mips/kernel/Makefile +++ b/arch/mips/kernel/Makefile | |||
@@ -98,4 +98,35 @@ obj-$(CONFIG_HW_PERF_EVENTS) += perf_event_mipsxx.o | |||
98 | 98 | ||
99 | obj-$(CONFIG_JUMP_LABEL) += jump_label.o | 99 | obj-$(CONFIG_JUMP_LABEL) += jump_label.o |
100 | 100 | ||
101 | # | ||
102 | # DSP ASE supported for MIPS32 or MIPS64 Release 2 cores only. It is safe | ||
103 | # to enable DSP assembler support here even if the MIPS Release 2 CPU we | ||
104 | # are targetting does not support DSP because all code-paths making use of | ||
105 | # it properly check that the running CPU *actually does* support these | ||
106 | # instructions. | ||
107 | # | ||
108 | ifeq ($(CONFIG_CPU_MIPSR2), y) | ||
109 | CFLAGS_DSP = -DHAVE_AS_DSP | ||
110 | |||
111 | # | ||
112 | # Check if assembler supports DSP ASE | ||
113 | # | ||
114 | ifeq ($(call cc-option-yn,-mdsp), y) | ||
115 | CFLAGS_DSP += -mdsp | ||
116 | endif | ||
117 | |||
118 | # | ||
119 | # Check if assembler supports DSP ASE Rev2 | ||
120 | # | ||
121 | ifeq ($(call cc-option-yn,-mdspr2), y) | ||
122 | CFLAGS_DSP += -mdspr2 | ||
123 | endif | ||
124 | |||
125 | CFLAGS_signal.o = $(CFLAGS_DSP) | ||
126 | CFLAGS_signal32.o = $(CFLAGS_DSP) | ||
127 | CFLAGS_process.o = $(CFLAGS_DSP) | ||
128 | CFLAGS_branch.o = $(CFLAGS_DSP) | ||
129 | CFLAGS_ptrace.o = $(CFLAGS_DSP) | ||
130 | endif | ||
131 | |||
101 | CPPFLAGS_vmlinux.lds := $(KBUILD_CFLAGS) | 132 | CPPFLAGS_vmlinux.lds := $(KBUILD_CFLAGS) |