linux-mips
[Top] [All Lists]

RE: [PATCH] MIPS: dsp: Add assembler support for DSP ASEs.

To: Florian Fainelli <florian@openwrt.org>
Subject: RE: [PATCH] MIPS: dsp: Add assembler support for DSP ASEs.
From: "Hill, Steven" <sjhill@mips.com>
Date: Sat, 15 Dec 2012 05:10:05 +0000
Accept-language: en-US
Cc: "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>
In-reply-to: <50C8938C.8020705@openwrt.org>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
References: <1354855981-28392-1-git-send-email-sjhill@mips.com>,<50C8938C.8020705@openwrt.org>
Sender: linux-mips-bounce@linux-mips.org
Thread-index: AQHN1DbCEutikq7i/UCxLXUHzYmgqZgVxmQAgAOVCZc=
Thread-topic: [PATCH] MIPS: dsp: Add assembler support for DSP ASEs.
>> +ifeq ($(call cc-option-yn,-mdsp2), y)
>> +CFLAGS_signal.o                      = -mdsp2 -DHAVE_AS_DSP
>> +CFLAGS_signal32.o            = -mdsp2 -DHAVE_AS_DSP
>> +CFLAGS_process.o             = -mdsp2 -DHAVE_AS_DSP
>> +CFLAGS_branch.o                      = -mdsp2 -DHAVE_AS_DSP
>> +CFLAGS_ptrace.o                      = -mdsp2 -DHAVE_AS_DSP
>
> Should not this be -mdspr2 here? My GCC man page suggests that.
>
Yes, corrected this.

> By the way, should not we also check that we are building for a
> MIPS32_R2 CPU when checking for -mdsp2?
>
Yes, fixed this also.

> I would simplify this like this:
>
> ifeq ($(CONFIG_CPU_MIPS32),y)
> CFLAGS_DSP = -DHAVE_AS_DSP
> ifeq ($(call cc-option-yn,-mdsp),y)
> CFLAGS_DSP += -mdsp
> endif
> ifeq ($(call cc-option-yn,-mdsp2),y)
> CFLAGS-DSP += -mdsp2
>endif
>
> CFLAGS_signal.o         = $(CFLAGS_DSP)
> ...
> CFLAGS_ptrace.o         = $(CFLAGS_DSP)
> endif
>
> such that the day you can take advantage of a third DSP flavor it's only
> 3 lines worth of Makefile to get it used, and you only have one place
> where you need to change CFLAGS.
>
Good idea, fixed.

I have posted a new patch for review.

-Steve

<Prev in Thread] Current Thread [Next in Thread>